Create 4 - Palindrome.py

This commit is contained in:
Lukas Baumann 2021-02-18 08:46:09 +01:00 committed by GitHub
parent 2543d7baf4
commit 0aeafe87da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

5
13/4 - Palindrome.py Normal file
View File

@ -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