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

12 lines
193 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()