top of page
Writer's pictureRajesh Singh

Python program to create a list of 5 numbers


Python program to create a list of 5 numbers. Numbers entered by User.

n=[]

for i in range(5):

j=int(input("Enter number: "))

n.append(j)

print("The List is", n)


Output:

Enter number: 3

Enter number: 5

Enter number: 6

Enter number: 8

Enter number: 9

The List is [3, 5, 6, 8, 9]



593 views0 comments

Recent Posts

See All

Comments


bottom of page