def sameChars(s1: str, s2: str) -> bool: """Check if two strings have the same characters regardless of order or count.""" if not (isinstance(s1, str) and isinstance(s2, str)): return False c1 = list(set(s1)) c2 = list(set(s2)) c1.sort() c2.sort() print(c1, c2) return c1 == c2 print("Testing sameChars()...", end="") assert sameChars("abc", "bac") == True assert sameChars("aaaaabbbbbbccccc", "abc") == True assert sameChars("abc", "ba") == False assert sameChars("ba", "abc") == False assert sameChars("AAAAAAaaaa", "Aa") == True assert sameChars("NNN", "n") == False assert sameChars("123", "123") == True assert sameChars("", "a") == False assert sameChars("", "") == True # assert sameChars(14, "14") == False # this check passes but if I don't comment it I get an editor warning since I've typed the function print("Passed!")