Python program to insert a number to any position in a list
Python program to insert a number to any position in a list
numbers = [3,4,1,9,6,2,8]
print(numbers)
x = int(input("Enter the number to be inserted: "))
y = int(input("Enter the position: "))
numbers.insert(y,x)
print(numbers)
Comments
Post a Comment