ZeroSeventty

Solución palíndrome (Lisanny)

Oct 16th, 2020
820
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def palindrome(lista):
  2.     for n, elemento in enumerate(lista):
  3.         if elemento[::-1] == elemento:
  4.             print(f"[{n}-{elemento}] es palindrome.")
  5.         else:
  6.             print(f"[{n}-{elemento}] NO es palindrome.")
  7.  
  8. lista = ["ana","antonio",77,"oso"]
  9. palindrome(lista)
RAW Paste Data