title: A very simple program:Rock Paper Scissors (python)
body: <p>Usual Rock Paper Scissors, but my if-else statement doesn't work. I would to appreciate if anyone could spot my errors.</p>
  
  <pre><code>def main():
  
      #ask for input and create a list to check valid input
      list = ['rock', 'paper', 'scissors']
      player_A = input('Rock, paper or scissors? ').lower()
      player_B = input('Rock, paper or scissors? ').lower()
  
      if player_A not in list or player_B not in list:
          print('Invalid value, please enter rock, paper or scissors')
          return
      else:
          rule(player_A,player_B)
  
  def rule(x,y):
  
      if (x,y == ['rock', 'paper']) or (x,y == ['paper', 'scissors']) or (x,y == ['scissors', 'rock']):
          print('{} wins'.format(y))
          print('{} loses'.format(x))
      elif (x,y == ['paper', 'rock']) or (x,y == 'scissors', 'paper') or (x,y == ['rock', 'scissors']):
          print('{} wins'.format(x))
          print('{} wins'.format(y))
      else:
          print('fair')
  
  main()
  </code></pre>
  
  <p>Also, I would also like to know if there is a faster way to determine the win condition, seems quite clumsy to check case by case.</p>