In your test data, try adding some leading or trailing spaces, then find a way so that they don’t matter. e.g.
1
2
3
-4
5-
6
42
99
(Where - represents a space.)
I’m no Python expert, but what is x : int doing? According to this page, Python has no command for declaring variables.