How to Count the Number of Words In a Python String - 2021

Опубликовано: 14 Июль 2026
на канале: Suraj Sharma - Full Stack Developer
350
5

This video is about how to count the number of words in a python string using string.split() method.

split() methods converts a string to list of words separated by a whitespace or a separator passed into it as an argument.

len() method gets the length of the list, which is final word counts.

Get free access to tutorials on Python and JavaScript on my personal website https://surajsharma.net