turtle.stamp() function in Python (original) (raw)
Last Updated : 3 Oct, 2025
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
Python `
import turtle
turtle.forward(100) # move turtle forward turtle.stamp() # stamp turtle shape turtle.forward(100) # keep moving forward
turtle.done()
`
**Output:

Here the middle one arrow is due to the stamp and next is turtle's head
**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
Python `
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()
`