+ 1
How can I make a list taking input from user?
7 Respostas
+ 11
Here is a link to a tutorial that shows some possible solutions you may look for.
https://code.sololearn.com/cT9gzxWimqjz/?ref=app
if you want to have input of multiple values, you can use a for loop and append the input to a list.
+ 8
#Try this
x = input().split()
print(x)
+ 5
You can use something like this
x = input().split()
print(x)
This will print an list
Or you can try something like this
list = []
lenOfList = 5
for i in range(lenOfList):
list.append(input())
print(list)
This will take a the value one bye one then append them into an list
+ 4
Gives Input of all listed values & print them
+ 3
# or shorter yet
[*input().split()]
+ 2
Thank you guys
+ 1
Can you please explain this with syntax?