Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

How to take total count of words in the list python

#How to find total count of "BMW" cars from the list

car_list = ["BMW", "Audi", "BMW", "Mercedez", "BMW", "Ferrari"]

count = 0

for cars in car_list:
    if cars == "BMW":
        count = count + 1
print("Total BMW Cars in Garage are:-", count)
 
PREVIOUS NEXT
Tagged: #How #total #count #words #list #python
ADD COMMENT
Topic
Name
5+8 =