Write a Python program using simple if() to create a list and get a search value from the user. If the search value is found in the list, print the number of times it has occurred.
Pls don't answer if u don't know, the best answer will be marked as brainliest.
Only simple if() to be used, no loops or anything else allowed.
Please help me
Answers
Answered by
1
Answer:
list=[1,2,3]
a=2
if a in list:
print("found")
else:
print("not found")
Explanation:
There is 'in' and 'not in' in python to checking is it present in list.
Hope it is helpful!
Please mark me as brainliest!
Similar questions
Math,
4 months ago
English,
4 months ago
Accountancy,
4 months ago
English,
9 months ago
Chemistry,
1 year ago