Ad
Sets

one-liner :D

Code
Diff
  • dumbRockPaperScissors=lambda a,b:('Draw','Player 1 wins','Player 2 wins')['RPS'.find(a[0])-'RPS'.find(b[0])]
    • def dumbRockPaperScissors(p1,p2,rpc={"Rock":"Paper","Paper":"Scissors","Scissors":"Rock"}):
    • if p1 in rpc[p2]: return "Player 1 wins"
    • if p2 in rpc[p1]: return "Player 2 wins"
    • return "Draw"
    • dumbRockPaperScissors=lambda a,b:('Draw','Player 1 wins','Player 2 wins')['RPS'.find(a[0])-'RPS'.find(b[0])]