- 3

Which code may i use if I want to take many integers from user input

.

25th Sep 2020, 12:12 AM
Isidore
Isidore - avatar
5 Réponses
+ 4
inp = input() nums = [int(el) for el in inp.split()] # userinput is eg 3 4 5 6 11 14
25th Sep 2020, 12:53 AM
Oma Falk
Oma Falk - avatar
+ 3
give us a language🙄
25th Sep 2020, 12:47 AM
Oma Falk
Oma Falk - avatar
+ 1
You can use a loop to take input again and again and can easily store them in array.
25th Sep 2020, 12:23 AM
Arsenic
Arsenic - avatar
0
Give me a code example
25th Sep 2020, 12:24 AM
Isidore
Isidore - avatar
25th Sep 2020, 12:49 AM
Isidore
Isidore - avatar