Q. Write a program to find the number of times an element occurs in the list.


Answer :-


lst = eval( input ("Enter a list :-") )
for i in lst :
    print(i , "Occur", lst.count(i),"times" )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post