fork download
  1. def esPalindromo(L):
  2. if not L:return True
  3. if L[0] != L[-1]:return False
  4. return esPalindromo(L[1:-1])
  5.  
  6. print(esPalindromo("se nan es"))
  7.  
Success #stdin #stdout 0.04s 9596KB
stdin
Standard input is empty
stdout
True