Write a Python Program to Search the Number of Times a Particular Number Occurs in a List


Topic: Write a Python Program to Search the Number of Times a Particular Number Occurs in a List

Solution

a = [2,3,2,3,4,4,5,5,6,6,6]
k=0
num=6
for j in a:
    if(j==num):
        k=k+1
print("Number of times",num,"appears is",k)



List all Python Programs