📜  用输入填充 python 列表 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:53.991000             🧑  作者: Mango

代码示例1
lst = [ ] 
n = int(input("Enter number of elements : ")) 
  
for i in range(0, n): 
    ele = input()
    lst.append(ele) 
      
print(lst)

# this will add a specified amount of strings to the list (lst)