Python program to add Value at assigned place
arrey=[]
n=int(input("Enter how many values "))
for i in range(n):
a=randint(1,15)
arrey.append(a)
print(arrey)
a=int(input("Enter Value : "))
p=int(input("Enter @ what place u want to add it : "))
arrey.insert(p-1,a)
print(arrey)
Keep it up. Going good.
ReplyDelete