Since lengths are same , some value would definitely become negative if result is false .
if ( map [ ord ( str2 [ i ] ) - ord ( ' a ' ) ] < 0 ) : NEW_LINE INDENT return False NEW_LINE DEDENT return True NEW_LINE