集合set是一个无序不重复元素的集
set(['hello','hello','hi'])
# {'hello', 'hi'}
set('hello hello hi')
# {' ', 'e', 'h', 'i', 'l', 'o'}
set.add()
与set.update()
的区别
myset1 = set()
myset1.add('hello')
#{'hello'}
myset1.update('world')
#{'d', 'hello', 'l', 'o', 'r', 'w'}
myset2 = set()
myset2.add('123')
myset2.update('123')
#{'1', '123', '2', '3'}