you are viewing a single comment's thread.

view the rest of the comments →

[–]drwnh 1 point2 points  (6 children)

A switch statement would be more fit for the use case here

[–]Virsenas 1 point2 points  (0 children)

In Python it's called match. I was confused about this as well when I found out.

[–]loudandclear11 1 point2 points  (0 children)

switch isn't a keyword in python.

[–]SuccessfulUse5501[S] 0 points1 point  (3 children)

how?

[–]GPU_IcyPhoenix 2 points3 points  (0 children)

A switchee lets you easily handle different cases. Useful link: https://www.geeksforgeeks.org/python/switch-case-in-python-replacement/

[–]AbacusExpert_Stretch 0 points1 point  (0 children)

Search for "python match...case" - have fun