Write a function that return space count


Topic: Write a function that return space count

Solution

 
def count_space(str1): 
    count = 0
      
    for i in range(0, len(str1)): 
        if str1[i] == " ": 
            count += 1
          
    return count



List all Python Programs