how to check if a string is entirely 1 character code example Example: how to check if all characters in string are same python s == len(s) * s[0]