how to search for all the same characters in a string python code example Example: how to check if all characters in string are same python s == len(s) * s[0]