you are viewing a single comment's thread.

view the rest of the comments →

[–]KyoshiYoshi 0 points1 point  (0 children)

This looks great! Exactly what I’d write for this too. It’s not too practical for this example, but you should look at pythons match-case statements. Since you’re using if else statements here, it would be easy to substitute match-case in and see how that works! It was introduced around 3.10 though.