使用tkinter,您将如何绘制代码?
def draw(x, y, code):
for i in range(8):
if code[i] != "0":
canvas.create_line(x+i*10, y, x+i*10, y+80, width = int(code[i]), fill = "black")
canvas.create_rectangle(x+5, y+65,x+65, y+80, fill = "white", outline = "white")
canvas.create_text(x+35, y+75, text = code)