fork download
  1. print(int('12\n'))
  2. print(int('\n123'))
  3. print(int('1234 '))
  4. print(int(' 1235'))
  5. print(int('1236c'))
  6. print(int('a1237'))
  7. print(int('123 8'))
  8.  
  9. #https://pt.stackoverflow.com/q/347387/101
Runtime error #stdin #stdout #stderr 0.01s 27704KB
stdin
Standard input is empty
stdout
12
123
1234
1235
stderr
Traceback (most recent call last):
  File "./prog.py", line 5, in <module>
ValueError: invalid literal for int() with base 10: '1236c'