t250.py 742 B

12345678910111213141516171819202122232425262728293031323334353637
  1. class A: pass
  2. a = A()
  3. print isinstance([], list)
  4. print isinstance([], dict)
  5. print isinstance([], str)
  6. print isinstance([], tuple)
  7. print isinstance([], A)
  8. print "---"
  9. print isinstance({}, list)
  10. print isinstance({}, dict)
  11. print isinstance({}, str)
  12. print isinstance({}, tuple)
  13. print isinstance({}, A)
  14. print "---"
  15. print isinstance("", list)
  16. print isinstance("", dict)
  17. print isinstance("", str)
  18. print isinstance("", tuple)
  19. print isinstance("", A)
  20. print "---"
  21. print isinstance((), list)
  22. print isinstance((), dict)
  23. print isinstance((), str)
  24. print isinstance((), tuple)
  25. print isinstance((), A)
  26. print "---"
  27. print isinstance(a, list)
  28. print isinstance(a, dict)
  29. print isinstance(a, str)
  30. print isinstance(a, tuple)
  31. print isinstance(a, A)
  32. print "---"