I have a string in an input that needs to be split into separate values and left in a list.
I am using the following construct to enter values. How can the value -1
be noticed on a variable var
?
import sys
readline = sys.stdin.readline
var = 10**5
current_line = list(map(int, readline().split()))
Example input:
-1 3 0 -1 4 5
Required value current_line
:
[var, 3, 0, var, 4, 5]