Answers for "what is count() in python"

3

freq count in python

freq = {} 
    for item in my_list: 
        if (item in freq): 
            freq[item] += 1
        else: 
            freq[item] = 1
Posted by: Guest on July-21-2020
4

count in python

it counts the number of elements in the list or in the string(words)
Posted by: Guest on June-06-2020
-2

what is the use of count function in python

count = 0 
while count < 10 :
  print("Hello")
  count += 1
Posted by: Guest on March-02-2021

Python Answers by Framework

Browse Popular Code Answers by Language