Write a Python program to print the number words in a sentence


Topic: Write a Python program to print the number words in a sentence

Solution

test_string = "India is my country"
res = len(test_string.split()) 
print (f"The number of words in string are : {res}") 



List all Python Programs