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

13 lines
239 B
Python
Raw Normal View History

2022-10-20 21:22:14 +00:00
def main():
s = input('Introduza uma string >> ')
print(ispalindrome(s))
def ispalindrome(s):
pal_s = s[::-1]
if pal_s == s:
return True
else:
return False
if __name__ == "__main__":
main()