how to count if the number of times a character appears in a string is the same python code example Example: how to tell if two numbers have the same characters python sorted(str1) == sorted(str2)