t423.py 285 B

123456789101112131415161718192021222324
  1. print set()
  2. # sets
  3. s = set()
  4. print set(s)
  5. # lists
  6. l = [1,2,3,4]
  7. print set([])
  8. print set([1,2,3,4])
  9. print set(l)
  10. # tuples
  11. t = (1,2,3,4)
  12. print set(())
  13. print set((1,2,3,4))
  14. print set(t)
  15. # dictionaries
  16. d = {1:2,3:4}
  17. print set({})
  18. print set(d)
  19. print set(d.keys())
  20. print set(d.values())