Count Number of Occurrences in List Python || List || Python

In this we are going to see a basic program to Count Number of Occurrences in List in Python Programming Language.

list1 = [1, 3, 5, 2, 3, 7, 1, 8, 5]
print("List :", list1)
print("Count Of Elements In The List :", len(list1))
print("---------------------------------------------------------------")
print("Enter Element To Count Its Occurrence In List :")
element = int(input())
print("Element Is Present In List :", list1.count(element))

# Coded By DHIRAJ SHELKE

#ENJOY CODING

Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post