Program to search for a specific element in a list using for loop

Program to search for a specific element in a list using for loop

#list is declared
num = [1,2,3,4,5,6,7]

#using for loop to run through the list
for x in num:
  if x == 3:
    print(x)
 

Post a Comment

0 Comments