Robotics & Artificial Intelligence
Write a Python program to search an element in the list.
Python List Manipulation
3 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
Write a Python program to create a list of first ten natural numbers. Add the square of each element to another empty list.
Write a Python program to convert a tuple into a list and a list into a tuple.
Write a Python program to generate the square of all the elements of a list.
Write a Python program to add all the elements of the list.