Python Turtle does not include a ready-made set of A–Z stroke-drawing functions. You can build one from its movement and pen-control commands: define a function for each supported letter, map characters to those functions, then advance the cursor as you draw a word.
Choose between rendered text and hand-drawn letters
If you only need to display a string, turtle.write() writes text at the Turtle’s current position, with alignment and font options. By default, move=False, so writing does not move the Turtle to the text’s bottom-right corner. Set move=True if you want that movement.
As an Amazon Associate I earn from qualifying purchases.
If the goal is to learn how shapes are constructed, stroke-based glyphs are different: your code controls the lines, turns, spacing, and disconnected strokes. That takes more setup, but lets you decide exactly how each letter is drawn. The Python documentation describes Turtle as a way for learners to encounter programming concepts through instant, visible feedback. Python 3.12 turtle documentation.
How the drawing commands fit together
Turtle is a cursor with a position, a heading, and a pen state. With the pen down, movement draws; with the pen up, it moves without leaving a line. forward(distance) follows the current heading, while left(angle) and right(angle) turn by degrees. goto(x, y) moves to absolute coordinates and draws a line if the pen is down; it does not change the heading.
#1 Best Overall
- Use
penup()before moving between separate strokes, such as the two legs of an A. - Use
pendown()when the next movement should leave a line. - Keep glyphs aligned to a shared height and width, and give each function a predictable starting point and orientation. Resetting to a known state or drawing relative to a known origin prevents one letter’s ending position from shifting the next.
Build a small A–Z stroke library
The following example uses block-style strokes in a 40-by-60 coordinate area. Each letter function starts at the glyph’s lower-left point, draws its strokes using absolute coordinates, then returns to that point with the pen up. The mapping provides uppercase A–Z; it is your program’s library, not a built-in Turtle alphabet.
import turtle
screen = turtle.Screen()
pen = turtle.Turtle()
pen.speed(0)
pen.pensize(3)
# A glyph occupies x=0..40 and y=0..60.
def stroke(points):
"""Draw connected points, then return to the glyph origin."""
pen.penup()
pen.goto(points[0])
pen.pendown()
for point in points[1:]:
pen.goto(point)
pen.penup()
pen.goto(0, 0)
# Each function is a list of separate strokes.
def A():
stroke([(0, 0), (0, 60), (40, 60), (40, 0)])
stroke([(0, 30), (40, 30)])
def B():
stroke([(0, 0), (0, 60), (30, 60), (40, 50), (40, 35), (30, 30), (0, 30)])
stroke([(30, 30), (40, 25), (40, 10), (30, 0), (0, 0)])
def C():
stroke([(40, 55), (32, 60), (5, 60), (0, 55), (0, 5), (5, 0), (40, 0)])
def D():
stroke([(0, 0), (0, 60), (25, 60), (40, 45), (40, 15), (25, 0), (0, 0)])
def E():
stroke([(40, 60), (0, 60), (0, 0), (40, 0)])
stroke([(0, 30), (30, 30)])
def F():
stroke([(0, 0), (0, 60), (40, 60)])
stroke([(0, 30), (30, 30)])
def G():
stroke([(40, 50), (35, 60), (5, 60), (0, 55), (0, 5), (5, 0), (40, 0), (40, 30), (22, 30)])
def H():
stroke([(0, 60), (0, 0)])
stroke([(40, 60), (40, 0)])
stroke([(0, 30), (40, 30)])
def I():
stroke([(0, 60), (40, 60)])
stroke([(20, 60), (20, 0)])
stroke([(0, 0), (40, 0)])
def J():
stroke([(40, 60), (40, 10), (30, 0), (5, 0), (0, 10)])
def K():
stroke([(0, 60), (0, 0)])
stroke([(40, 60), (0, 30), (40, 0)])
def L():
stroke([(0, 60), (0, 0), (40, 0)])
def M():
stroke([(0, 0), (0, 60), (20, 35), (40, 60), (40, 0)])
def N():
stroke([(0, 0), (0, 60), (40, 0), (40, 60)])
def O():
stroke([(5, 0), (0, 5), (0, 55), (5, 60), (35, 60), (40, 55), (40, 5), (35, 0), (5, 0)])
def P():
stroke([(0, 0), (0, 60), (35, 60), (40, 55), (40, 35), (35, 30), (0, 30)])
def Q():
stroke([(5, 0), (0, 5), (0, 55), (5, 60), (35, 60), (40, 55), (40, 5), (35, 0), (5, 0)])
stroke([(25, 15), (42, -2)])
def R():
stroke([(0, 0), (0, 60), (35, 60), (40, 55), (40, 35), (35, 30), (0, 30)])
stroke([(20, 30), (40, 0)])
def S():
stroke([(40, 55), (35, 60), (5, 60), (0, 55), (0, 35), (5, 30), (35, 30), (40, 25), (40, 5), (35, 0), (0, 0)])
def T():
stroke([(0, 60), (40, 60)])
stroke([(20, 60), (20, 0)])
def U():
stroke([(0, 60), (0, 5), (5, 0), (35, 0), (40, 5), (40, 60)])
def V():
stroke([(0, 60), (20, 0), (40, 60)])
def W():
stroke([(0, 60), (8, 0), (20, 25), (32, 0), (40, 60)])
def X():
stroke([(0, 60), (40, 0)])
stroke([(0, 0), (40, 60)])
def Y():
stroke([(0, 60), (20, 30), (40, 60)])
stroke([(20, 30), (20, 0)])
def Z():
stroke([(0, 60), (40, 60), (0, 0), (40, 0)])
letters = {
"A": A, "B": B, "C": C, "D": D, "E": E, "F": F, "G": G,
"H": H, "I": I, "J": J, "K": K, "L": L, "M": M, "N": N,
"O": O, "P": P, "Q": Q, "R": R, "S": S, "T": T, "U": U,
"V": V, "W": W, "X": X, "Y": Y, "Z": Z,
}
def draw_word(word):
word = word.upper()
pen.penup()
for char in word:
if char == " ":
pen.forward(30) # wider gap for a word space
elif char in letters:
letters[char]()
pen.forward(50) # 40-unit glyph plus 10-unit gap
else:
# Unsupported punctuation or characters leave a small gap.
pen.forward(20)
draw_word("HELLO TURTLE")
pen.hideturtle()
screen.mainloop()
How the word renderer works
- Normalize once:
word.upper()makes lowercase input use the uppercase routines. - Dispatch by character:
letters[char]()looks up and calls the matching function. - Advance after each glyph: each function returns to the glyph origin, so
forward(50)moves to the next start position. The 40-unit glyph width plus a 10-unit gap makes the spacing predictable. - Treat spaces separately: a space draws no letter and advances farther. Change 30 to adjust the word gap.
- Choose a fallback: this example advances 20 units for unsupported punctuation or non-ASCII letters rather than drawing them. Replace that branch with an error message or another policy if silent skipping is unsuitable.
To add a lowercase style or punctuation, define its drawing routine and add it to the mapping. This example covers the 26 uppercase English letters only; it is not a complete Unicode or multilingual font.
Rank #2
Keep the Turtle window open
In a script, the graphics window can close when execution ends unless the program enters Turtle’s event loop. The example calls screen.mainloop() after drawing; the documentation also shows mainloop() as a way to keep a functional script running.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsCommon setup and drawing problems
- A line appears between separate parts of a letter: check that the pen is up before repositioning, then put it down only for the stroke.
- Letters drift or overlap: verify that each glyph ends at its expected origin and that the renderer advances by more than the glyph width.
- The window disappears immediately: ensure the event-loop call occurs after the drawing code.
- An import reports missing
_tkinter: Turtle relies on Tk support. The Python documentation says the Tk interface package may need to be installed through your Python distributor; the specific steps depend on your operating system and Python installation.
When to use turtle.write() instead
Use turtle.write(text, align=..., font=...) when you want text rendered with a font and do not need to expose how each stroke is built. Use custom glyph functions when individual line geometry, hand-drawn appearance, or per-letter spacing is the point of the exercise. They solve different needs: write() renders a string, while the A–Z mapping gives your program control over its own stroke paths.
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




