Function to check if all characters are distinct
def ifAllDistinct ( st ) : NEW_LINE INDENT s = [ ] NEW_LINE for c in st : NEW_LINE INDENT s . append ( c ) NEW_LINE DEDENT return len ( set ( s ) ) == len ( st ) NEW_LINE DEDENT