3 ms·
I prefer this idea, but instead of a shell-style ending unique to every scoped structure, maybe just a ";" character?: def IsPalindrome(s) -> bool
by Chris2048 3y ago
I prefer this idea, but instead of a shell-style ending unique to every scoped structure, maybe just a ";" character?:
def IsPalindrome(s) -> bool
for i in range(len(s))
if s[i] != s[len(s)-1-i]
return False;
;
return True;
I'd also be inclined to skip it for 'def' as well, since they tend not be be as nested.