t421.py 385 B

1234567891011121314151617181920212223
  1. print repr(1)
  2. print repr(100L)
  3. print repr(1.5)
  4. print repr([])
  5. print repr([1,2,3,4])
  6. print repr(())
  7. print repr((1,2,3,4))
  8. print repr({})
  9. print repr({1:2,3:4})
  10. print repr('')
  11. print repr('hello world')
  12. print repr(object())
  13. class A(object):
  14. def __init__(self): pass
  15. print repr(A())
  16. class B:
  17. def __init__(self): pass
  18. def __repr__(self): return 'custom repr'
  19. print repr(B())