+ 1

I want to get the input from the user and i want to store it in a list.I tried like this#list[]=input(""). It shows error.help m

Beginner

15th Apr 2020, 3:57 PM
Lavanya T
Lavanya T - avatar
3 Respuestas
+ 8
There are some ways, if you want to index character by character, print(list(input())) or, print([input()]) but, if your input is a sentence and you want each word to be indexed not character then, print(input().split())
15th Apr 2020, 4:08 PM
M Tamim
M Tamim - avatar
+ 1
Tq. I got it
15th Apr 2020, 4:07 PM
Lavanya T
Lavanya T - avatar
+ 1
tq
15th Apr 2020, 4:16 PM
Lavanya T
Lavanya T - avatar