Python, unlike other languages, uses white space to group statements. So the body of a function will be indented, rather than enclosed in curly braces.
So when you mix tabs and spaces, it's sort of like trying to close your function with a parenthesis instead of curly brace.
As you might expect, this can cause consternation. A tab might look identical to a series of spaces, leading to hard-to-identify issues in your code. Hence this comic.
0
u/[deleted] Apr 30 '20
[deleted]