uaveiro-leci/1ano/1semestre/fp/aula05/ispalindrome.py

13 lines
186 B
Python
Executable File

def main():
s = input('Introduza uma string >> ')
print(ispalindrome(s))
def ispalindrome(s):
pal_s = s[::-1]
return pal_s == s
if __name__ == "__main__":
main()