Benjamin_Loison

Ben

Aug 25th, 2018
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. sets = [input(), input()]
  2. setsLength = [len(sets[0]), len(sets[1])]
  3. playedCards = 0
  4.  
  5. if setsLength[0] < setsLength[1]:
  6.    setMinLength = setsLength[0]
  7. else:
  8.    setMinLength = setsLength[1]
  9.    
  10. while(sets[0][playedCards] == sets[1][playedCards] and playedCards < setMinLength):
  11.    playedCards += 1
  12.  
  13. newSetsAreNul = [setsLength[0] - playedCards == 0, setsLength[1] - playedCards == 0]
  14. if(newSetsAreNul[0] and newSetsAreNul[1]):
  15.    print("=")
  16. elif(newSetsAreNul[1] or sets[0][playedCards] < sets[1][playedCards]):
  17.    print("1")
  18. else:
  19.    print("2")
Add Comment
Please, Sign In to add comment