4 ms·
I usually try to bail out of my code early on in Python so I have all my if bail condition statements before I bother trying to do any other logic. Actually I d
by giancarlostoro 7y ago
I usually try to bail out of my code early on in Python so I have all my if bail condition statements before I bother trying to do any other logic. Actually I do this in all languages.
Bail early and you wont have spaghetti code, plus you wont even allocate things to memory you're not even going to use, cause you're going to bail.