3 Respuestas
+ 3
You can use an input with split, map and int conversion or a list comprehension with int conversion:
(1) input with split(), int conversion:
inp = list(map(int, input('').split())) # input like: 1 3 12
(2) input with split(), int conversion and comprehension:
inp = [ int(i) for i in input().split()] # input like: 1 3 12
+ 1
Can you explain a little more? What are you talking about? What do you mean? Do you have an example to share?
+ 1
Use
map(int, input())
For int datatypes