Computer Science, asked by Anonymous, 10 months ago

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 pavithranatarajan855
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, 10 months ago