how to take total count of words in the list python

Solutions on MaxInterview for how to take total count of words in the list python by the best coders in the world

showing results for - "how to take total count of words in the list python"
Henri
08 May 2018
1#How to find total count of "BMW" cars from the list
2
3car_list = ["BMW", "Audi", "BMW", "Mercedez", "BMW", "Ferrari"]
4
5count = 0
6
7for cars in car_list:
8    if cars == "BMW":
9        count = count + 1
10print("Total BMW Cars in Garage are:-", count)