turtle.stamp() function in Python

The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses tkinter for the underlying graphics, it needs a version of Python installed with Tk support.
turtle.stamp()
This method is used to stamp a copy of the turtleshape onto the canvas and return its id. It doesn’t require any argument. Whatever the shape of the turtle is, it is printed at that point and continues with the next instructions.
turtle.stamp()
Below is the implementation of the above method with some examples :
Example 1:
Python3
# import packageimport turtle Â
# forward turtle by 100turtle.forward(100)Â
# print the turtle shapeturtle.stamp()Â
# and then continue# forward turtle by 100turtle.forward(100) |
Â
Â
Output:Â
Â
Here the middle one arrow is due to the stamp and next is turtle’s head
Â
Example 2:
Â
Python3
# import packageimport turtle Â
# loop for printing some stampsfor i in range(15):         # for motion    turtle.forward(100+10*i)         # printing turtle shape    turtle.stamp()         # for pattern    turtle.right(90) |
Â
Â
Output :
Â
Printing the turtle’s shape at each movement
Â



