123456789101112131415161718192021222324 |
- print set()
- # sets
- s = set()
- print set(s)
- # lists
- l = [1,2,3,4]
- print set([])
- print set([1,2,3,4])
- print set(l)
- # tuples
- t = (1,2,3,4)
- print set(())
- print set((1,2,3,4))
- print set(t)
- # dictionaries
- d = {1:2,3:4}
- print set({})
- print set(d)
- print set(d.keys())
- print set(d.values())
|