Dapatkan Input Daftar dari Pengguna di Python
a = list(map(int,input("\nEnter the numbers : ").strip().split()))
Faithful Flamingo
a = list(map(int,input("\nEnter the numbers : ").strip().split()))
# number of elements
n = int(input("Enter number of elements : "))
# Below line read inputs from user using map() function
a = list(map(int,input("\nEnter the numbers : ").strip().split()))[:n]
print("\nList is - ", a)
lst = [ ]
n = int(input("Enter number of elements : "))
for i in range(0, n):
ele = [input(), int(input())]
lst.append(ele)
print(lst)
shopList = []
maxLengthList = 6
while len(shopList) < maxLengthList:
item = input("Enter your Item to the List: ")
shopList.append(item)
print shopList
print "That's your Shopping List"
print shopList
1print("hello")
2
3
5
6
7
8
9
3