For quick-and-dirty parsing strings in Python, I love list comprehensions with `split()`.
Like: `[word.strip() for word in s.split(',') if word]`
Also, `str.partition()` is underrated—splits into 3 parts (before, sep, after). Super clean for simple splits.
Like: `[word.strip() for word in s.split(',') if word]`
Also, `str.partition()` is underrated—splits into 3 parts (before, sep, after). Super clean for simple splits.
