csc-python-solutions/13/4 - Palindrome.py

6 lines
120 B
Python
Raw Normal View History

2021-02-18 07:46:09 +00:00
def isPalindrome(S):
for i in range(len(S)//2):
if S[i] != S[len(S)-i-1]:
return False
return True