Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

number of words in a string python

a_string = "one two three four"
word_list = a_string.split()
print(len(word_list)) # Outputs 4
Source by www.kite.com #
 
PREVIOUS NEXT
Tagged: #number #words #string #python
ADD COMMENT
Topic
Name
4+6 =