<s> __author__ = "<STR_LIT>" <EOL> '''<STR_LIT>''' <EOL> def alpha_permutation ( string ) : <EOL> '''<STR_LIT>''' <EOL> if len ( string ) < <NUM_LIT:2> : <EOL> return string <EOL> result = [ ] <EOL> for i , c in enumerate ( string ) : <EOL> rest = string [ i + <NUM_LIT:1> : ] + string [ : i ] <EOL> for cc in alpha_permutation ( rest ) : <EOL> if cc . isalpha ( ) : <EOL> result . append ( c . upper ( ) + cc ) <EOL> result . append ( c + cc ) <EOL> return result <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> import doctest <EOL> doctest . testmod ( ) </s>
