Python Project

Program to print list of name from the given list and also print the serial no with the name.

Class 11th CBSE

Assignement 

Q.7. Program to print list of name from the given list and also print the serial no with the name

Solution :- 

l =[]

#Number of elements will be entered by the user
n = int(input(“Enter the number of elements in the list:”))
# for loop to take the input
for i in range(0,n):
# The input is taken from the user and added to the list as the item
      l.append (input(“Enter the item:”))

print(“printing the value of the list items..”,)

# traversal loop to print the list items

for i in l:
      print(i, end = “\n”)

 

Output :- 

 

 

TRY THIS CODE :- 

Fun & Easy to follow
Works on all devices
Your own Pace
Super Affordable

Popular Videos

Play Video

UX for Teams

Learn the basics and a bit beyond to improve your backend dev skills.

ava4.png
Chris Matthews

Designer

Play Video

SEO & Instagram

Learn the basics and a bit beyond to improve your backend dev skills.

ava4.png
Chris Matthews

Designer