turtle.stamp() function creates a copy of the current turtle shape at its present position on the canvas. It does not pause or interfere with the turtle’s movement, so the turtle continues executing the next instructions after stamping. Each stamp is given a unique ID, which can later be used with turtle.clearstamp(stampid) to remove a particular stamp or with turtle.clearstamps() to clear all the stamps from the canvas.
Syntax
turtle.stamp()
Parameters: This method takes no arguments.
Returns:
- An integer ID is a unique identifier for the stamp just created.
- This ID can be stored and later used for selective removal.
Examples
Example 1: Creating a single stamp
import turtle
turtle.forward(100) # move turtle forward
turtle.stamp() # stamp turtle shape
turtle.forward(100) # keep moving forward
turtle.done()
Output:

Explanation : stamp() freezes the turtle’s current shape at its position. The turtle itself keeps moving and is not affected.
Example 2: Stamping in a loop to make a pattern
import turtle
for i in range(15):
turtle.forward(100 + 10 * i) # move forward increasing distance
turtle.stamp() # leave a stamped shape
turtle.right(90) # turn right
turtle.done()
Output:

Explanation: Each iteration moves the turtle forward a bit farther (100 + 10*i). A stamp is placed at each stop. Turning right by 90° gradually creates a spiral effect.
Related Articles