PYTHON PROGRAM FOR NESTED LISTS
n=int(input("Enter the no of list: "))
print("Enter the list",n)
a=[]
print("Enter the %d datas with space: "%(n))
a.append(list(map(int,input().split())))
print(a)
s=len(a[0])
print(len(a[0]))
if n>=s:
print(a)
else:
print("invalid")
print(len(a[0]))
#a.append(list(map(int,input().split())))
#print("adh",a)
"""lst=[]
n=int(input("Enter the number of elements"))
for i in range(0,n):
ele=[int(input("Enter the %d first position"%(i))) ,int(input("Enter the %d second position"%(i)))]
lst.append(ele)
print(lst)"""
lst=[]
n=int(input("Enter the number of elements"))
for i in range(0,n):
ele=[int(input("Enter the %d first position"%(i)))]
lst.append(ele)
print(lst)
print(len(lst))
print(min(lst))
Comments
Post a Comment