From 0aeafe87daf2143258dadb47861b90a919ad81c9 Mon Sep 17 00:00:00 2001 From: Lukas Baumann Date: Thu, 18 Feb 2021 08:46:09 +0100 Subject: [PATCH] Create 4 - Palindrome.py --- 13/4 - Palindrome.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 13/4 - Palindrome.py diff --git a/13/4 - Palindrome.py b/13/4 - Palindrome.py new file mode 100644 index 0000000..0c839e9 --- /dev/null +++ b/13/4 - Palindrome.py @@ -0,0 +1,5 @@ +def isPalindrome(S): + for i in range(len(S)//2): + if S[i] != S[len(S)-i-1]: + return False + return True