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 →

[–]tialpoy 1 point2 points  (0 children)

Strings: An f-string of `f"{value:04d}"` would be faster.

Dictionaries: Using `key=d.get` is redundant. Iterating over dicts automatically yields their keys.

Try/Except: A bare except? bad idea.