DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
count words in a string
function WordCount(str) { return str.split(" ").length; } console.log(WordCount("hello world"));
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#count
#words
#string
ADD COMMENT
Topic
COMMENT
Name
2+7 =
Submit