t412.py 360 B

123456789101112131415161718192021222324
  1. print int()
  2. # integers and long integers
  3. print int(123)
  4. print int(-123)
  5. print int(456L)
  6. print int(-456L)
  7. # floating point
  8. print int(-1.1)
  9. print int(-0.9)
  10. print int(-0.1)
  11. print int(0.5)
  12. print int(0.9)
  13. print int(1.1)
  14. # string
  15. print int('10')
  16. print int(' -1234 ')
  17. print int('101',0)
  18. print int('101',2)
  19. print int('101',8)
  20. print int('101',10)
  21. print int('A',16)