Python and ML Books for FREE!
- Intro to ML
- ML Projects
- Think Python
- Python for Data Analysis
If you want a FREE copy,
1. Like + Repost
2. Comment 'Python'
3. Follow me @python_spaces so that I can DM you.
Hello friend.
Professional Programming Tip #4: The SWITCH(TRUE()) Standard
Avoid Nested IFs at all costs.
If you find yourself writing IF( ... IF( ... IF( ... ))), stop immediately.
Refactor it into a SWITCH(TRUE()) statement.
Readability: It looks like a clean list of rules.
Maintenance: It is much easier to add a new rule in the middle of a SWITCH list than to surgically insert it into a nest of parentheses.
Performance: The engine handles SWITCH efficiently.