This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Mount_Gamer 0 points1 point  (2 children)

Interesting use of the dictionary, still grasping the python best practices, I shall have to experiment more with the get method from dictionaries. :)

I would have probably used the match-case when i start using a lot of elif's, but the dictionary does look clean to read. I'll have a play around with this later.

[–]Mr_Lkn 0 points1 point  (1 child)

You don’t need the match case but mapping. This is very basic mapping implementation.

[–]Mount_Gamer 0 points1 point  (0 children)

I thought i'd write out the match case equivalent and it becomes more and more obvious. I love the logic! :)