xxxxxxxxxx
s=list(eval(input("Enter numbers-"))) #BASED
xxxxxxxxxx
list1 = []
length = int(input("input the length of your list"))
print("Input values of the list")
for i in range(length):
values = int(input())
list1.append(values)
print(list1)
xxxxxxxxxx
input_string = input("Enter a list element separated by space ")
list = input_string.split()
print("Calculating sum of element of input list")
sum = 0
for num in list:
sum += int (num)
print("Sum = ",sum)
xxxxxxxxxx
a = []
s = int(input("Enter the size of array: "))
for i in range(0, s):
ele = int(input("Enter the elements of the array: "))
a.append(ele)
print(a)