Array for keeping track of both uppercase and lowercase english alphabets
uppercase = [ False ] * 26 NEW_LINE lowercase = [ False ] * 26 NEW_LINE arr = list ( str ) NEW_LINE for c in arr : NEW_LINE INDENT if ( c . islower ( ) ) : NEW_LINE INDENT lowercase [ ord ( c ) - ord ( ' a ' ) ] = True NEW_LINE DEDENT if ( c . isupper ( ) ) : NEW_LINE INDENT uppercase [ ord ( c ) - ord ( ' A ' ) ] = True NEW_LINE DEDENT DEDENT