I never liked how people in Python use stringWithSpaces.split instead of a list. Just feels wrong somehow.
But I've seen it many times so it's probably pythonic
But I've seen it many times so it's probably pythonic
('Hearts', 'Diamonds', 'Spades', 'Clubs')
and has less opportunity for typos and syntax errors. If I was concerned about performance I would replace it with a tuple, but it was Good Enough for a quick example.It's not about performance, but about one more incidental step when reading the code. Small cost, but it's there.
But you have a good point. YAGNI is YAGNI.
It avoids having to do a big change if you need to add a new item with spaces in it.
Avoids lots of ", "