fork download
  1. # your code goes here
  2.  
  3. def numberGame(s):
  4. index = 0
  5. for i in s:
  6. if i != s[len(s) - index -1]:
  7. return "loses"
  8. break # ??
  9. index += 1
  10. return "wins"
  11.  
  12.  
  13.  
  14. print(numberGame("343"))
  15. print(numberGame("8898"))
Success #stdin #stdout 0.03s 9648KB
stdin
Standard input is empty
stdout
wins
loses