KnowledgeBoat Logo
|

Robotics & Artificial Intelligence

Write a Python program to search an element in the list.

Python List Manipulation

2 Likes

Answer

number = [45, 67, 12, 56, 78]
e = int(input("Enter the element to search: "))
if e in number:
    print("Element is found in the list.")
else:
    print("Element is not found in the list.")

Output

Enter the element to search: 67
Element is found in the list.

Answered By

3 Likes


Related Questions