(no title)
the_gigi | 4 years ago
Instead of:
s = ['a', 'b', 'c']
I'll type: s = 'a b c'.split()
For multiline lists where I want to get rid of leading whitespace I'll add lstrip(): lines = """line 1
line 2
line 3
""".split('\n')
lines = [line.lstrip() for line in lines]
No comments yet.