1# number of elements
2n = int(input("Enter number of elements : "))
3
4# Below line read inputs from user using map() function
5a = list(map(int,input("\nEnter the numbers : ").strip().split()))[:n]
6
7print("\nList is - ", a)
1input_string = input("Enter a list element separated by space ")
2list = input_string.split()
3print("Calculating sum of element of input list")
4sum = 0
5for num in list:
6 sum += int (num)
7print("Sum = ",sum)
8
1lst = [ ]
2n = int(input("Enter number of elements : "))
3
4for i in range(0, n):
5 ele = [input(), int(input())]
6 lst.append(ele)
7
8print(lst)