Python 3 - Using Lists/Tuples Instead of IF

Опубликовано: 18 Март 2026
на канале: Computing and ICT in a Nutshell
590
4

See how you can use arrays/lists/tuples instead of multiple IFs to create a shorter, clearer and more easily-extended program.

You can read more about using arrays/lists/tuples for selection here:
https://www.advanced-ict.info/blog/ar...

You can look at the improved version of the Magic 8 Ball program here:
https://console.basthon.fr/?from=http...

NB. I have switched from Replit to Basthon since making the video - click the Exécuter button to run the programs above (and make sure you say No to your browser translating the page).