86 font_path = "./assets/ShareTechMono-Regular.ttf"
87 font_size = 48
88 font = ImageFont.truetype(font_path, font_size)
89 text_width, text_height = draw.textsize(title, font=font) 90 text_x = (img.width - text_width) // 2
91 text_y = logo_y + logo.height + 20
92 draw.text((text_x, text_y), title,
An unused variable takes up space in the code, and can lead to confusion, and it should be removed. If this variable is necessary, name the variable _
to indicate that it will be unused, or start the name with unused
or _unused
.
def update():
for i in range(10): # Usused variable `i`
time.sleep(0.01)
display_result()
def update():
for _ in range(10):
time.sleep(0.01)
display_result()