How to write something on the canvas
Until now, ve’ve seen how to draw rectangles and lines on the canvas. Now we want to add text to it (ve’ve seen something in the lesson about moving a square on the screen).
To add a text you simply write:
canvas = tk.Canvas(root, width=400, height=500) canvas.pack() canvas.create_text(100,10, text="Hello World!")
This is the result:
Video with the code