Length
The length predefined function calculates the number of characters in a string, or the number of items within an array or list. Length will give you an integer value.
The below program will print out the number 4, the number of characters in the name “John”.
name = "John" number_of_characters = len(name) print(number_of_characters)