iLig1, iCol1 , iLig2 , iCol2 , carac = map(int, input ().split ())
hello I try to get this ligne of input in my code right, I get 5 variables from an input that look like this:
1 12 7 14 u
how can I declare the last one as a str properly,
I tried to consider them all as str and convert the 4 first as int but I cannot interpret str as int (you know..)
Thank you for your help !
>Solution :
You can use the Iterable Unpacking : (*).
# we suppose input is -> 1 2 3 4 u
>>> (*i, j) = input().split()
>>> print(i)
['1', '2', '3', '4']
>>> print(j)
u
>>> list(map(int, i))
[1, 2, 3, 4]