3 ms·
Well, the colon can be used without indentation if the block that follows is just a single line: def embiggen(x): return x * 2 for i in range(10): print(em
by ptx 13y ago
Well, the colon can be used without indentation if the block that follows is just a single line:
def embiggen(x): return x * 2
for i in range(10): print(embiggen(x))
Also, it just makes things read more naturally to us humans, I think.