0
User input
How to make the user enter more than 1 value(eg make them enter a list of numbers )
3 Réponses
+ 7
If you want to take a list as input, look at this code. Just escape the part after line 13.
https://code.sololearn.com/cs5obxeuKgf5/?ref=app
+ 4
numbers = list(map(int, input().split()))
0
lst =[int(x) for x in input().split(',')]
here lst is simply the name given to the list and instead of split(',') u can use split() for numbers to be entered separated by spaces.