fork download
  1. def is_polindrome(word):
  2. if word[0]==word[-1] and len(word)>2:
  3. return is_polindrome(word[1:-1])
  4. print(word, 'это полиндром')
  5. elif len(word)==1:
  6. print('это полиндром')
  7. elif word[0]==word[-1] and len(word)==2:
  8. print('это полиндром')
  9. else:
  10. print('это не полиндром')
  11. is_polindrome('boob')# your code goes here
Success #stdin #stdout 0.01s 28384KB
stdin
Standard input is empty
stdout
это полиндром