Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # pokemon.py by gauravssnl
- pokemonL = [ ]
- while True :
- pname = raw_input( 'Pokemon Name:' )
- if pname != " " and pname not in pokemonL :
- pokemonL.append( pname )
- elif pname == " " :
- break
- # sort name
- pokemonL.sort( )
- # relate each pokemon to remaining pokemon
- for i in range( len( pokemonL ) ) :
- for j in pokemonL[ i+1 : ] :
- print("%s defeats %s"%( pokemonL[i] , j ) )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement