t415.py 286 B

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