Closed Magikarple closed 4 years ago
f-strings are more readable, they can also be slightly shorter and are slightly faster
for example, this line in colors.py
"#%06x" % random.randint(0, 0xFFFFFF)
can be replaced with...
f"#{random.randint(0, 0xFFFFFF):x}"
https://cito.github.io/blog/f-strings/ for more info
interesting and good to know; will probably happen a bit at a time as I touch other things.
f-strings are more readable, they can also be slightly shorter and are slightly faster
for example, this line in colors.py
can be replaced with...
https://cito.github.io/blog/f-strings/ for more info