csc-python-solutions/13/4 - Palindrome.py
2021-02-18 08:46:09 +01:00

6 lines
120 B
Python

def isPalindrome(S):
for i in range(len(S)//2):
if S[i] != S[len(S)-i-1]:
return False
return True