+ 2
How to get input in a list??
I want to get input through user in a list but don't know how to do that? if anyone knows please solve this problem.thanks in advance
7 ответов
+ 4
I got a answer after a long research -
This is done by list comprehension
n = 10
list = [int(input()) for i in range(n)]
+ 1
list = []
inp = input ("enter item")
list.append(inp)
print list
0
I guess we need to use raw.input() or input()
0
raw_input() is not supported in Python 3.5
0
then its input() with numbers separated by a comma
0
raw.input() does not support in Python 3.x
0
raw_input() I have tried.my solution works.u just see my answer