check number of characters in string python code example
Example 1: how to check if all characters in string are same python
s == len(s) * s[0]
Example 2: python return number of characters in string
# Example usage:
your_string = "Example usage"
len(your_string)
--> 13