为什么这两种写法都return了”None“?
name_lis = [] name_set = set(name_lis) new = ['Jenny', 'Ellena', 'Alice', 'Candy', 'David', 'Hally', 'Bob', 'Isen', 'Karl'] print(name_set.update(new))
name_lis = [] name_set = set(name_lis) new = ['Jenny', 'Ellena', 'Alice', 'Candy', 'David', 'Hally', 'Bob', 'Isen', 'Karl'] final = name_set.update(new) print(final)
谢谢!