3 ms·
To me the second version seems not only clearer/more direct to follow but also is a few characters shorter anyways.
by zamadatix 4y ago
To me the second version seems not only clearer/more direct to follow but also is a few characters shorter anyways.
- japanuspus 4y agoBut the second version needs to run `.strip` twice. It might not make much of a difference for `strip` -- but it still hurts my eyes, and could be an actual performance issue for other operations.
- pydry 4y agoRunning strip twice makes it more explicit and readable IMHO - it's then abundantly clear that it's being run as a check and as a way of populating the list.