Learn Python
Strings
3.10
Lesson

Calculating the length of a string

We can calculate the length of a string using the function len.

It returns the number of characters in the string.

In the example given above, we are calculating the length of the string Mango.