r/PythonLearning • u/gyrojoestar31 • Sep 17 '26
Help Request any clue how to do this?
im on my first year of learning python in school is this even possible??
25
Upvotes
r/PythonLearning • u/gyrojoestar31 • Sep 17 '26
im on my first year of learning python in school is this even possible??
View all comments
2
u/steb2k Sep 17 '26
you want what is usually called a switch, but is called match/case in python.
Or - you could be clever and use a dict, I think this is called a registry pattern.
Using a dictionary as a switch statement in Python - Stack Overflow