Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
AidanBaird authored May 14, 2022
1 parent 6de2531 commit 1586a9b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Is_it_a_palindrome_kyu8.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# A function that checks if a given word is a palindrone
# Reserving the string with the use of a slice [::-1] to start the word from back to front
# Ensuring both variables are lower case
# Then returning a bolean


def is_palindrome(s):
reversed = s[::-1]
if s.lower() == reversed.lower():
return True
else:
return False

0 comments on commit 1586a9b

Please sign in to comment.