I was bitten so many times by un-indented code, thanks to copy / paste that took me hours for figure out what was the actual problem.<p>I wish Python had closing...how do we call them, tags(?), clauses?<p>Anyway, here's an example of what I mean:<p>Before:<p><pre><code> def IsPalindrome(s) -> bool:
for i in range(len(s)):
if s[i] != s[len(s)-1-i]:
return False
return True
print("Is Anna a palindrome?", IsPalindrome('ANNa'.lower()))
</code></pre>
after:<p><pre><code> def IsPalindrome(s) -> bool
for i in range(len(s))
if s[i] != s[len(s)-1-i]
return False
endif
endfor
return True
enddef
print("Is Anna a palindrome?", IsPalindrome('ANNa'.lower()))</code></pre>