You may want to use Format specifiers or fstrings (>py36) for a „more pythonic“ code.
Also why do you annotate every variable, even if the type can be deduced automatically? That’s going to be a real PITA if you want to refactor the code e.g to support floats instead of ints any time in the future (in this case it’s probably just a hypothetical problem)
its mostly for myself, i prefer to annotate variables so i can quickly know what type they should be when writing code (especially for bigger projects). I guess since lowbar is small, its pretty pointless, but its just a habit thats been stuck
dangrie158|3 years ago
Also why do you annotate every variable, even if the type can be deduced automatically? That’s going to be a real PITA if you want to refactor the code e.g to support floats instead of ints any time in the future (in this case it’s probably just a hypothetical problem)
carrotmoncher|3 years ago