turtle.clearstamp() method in Python Last Updated : 21 Jul, 2020 Comments Improve Suggest changes Like Article Like Report 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.clearstamp() The turtle.clearstamp() method is used to delete all or first/last n of turtle's stamps. This method requires an argument of an integer. So, the stamp made with an id is cleared by it. Syntax : turtle.clearstamp(stampid) Parameter: stampid - an integer, must be return value of previous stamp() call. Below is the implementation of the above method with some examples : Example 1 : Python3 # import package import turtle # set turtle speed to slowest # for better understandings turtle.speed(1) # motion with stamps # and their ids turtle.forward(50) id1 = turtle.stamp() turtle.forward(50) id2 = turtle.stamp() turtle.forward(50) id3 = turtle.stamp() # hide the turtle to # clarify stamps turtle.ht() # clear the stamps # of id : id1 and id3 turtle.clearstamp(id1) turtle.clearstamp(id3) Output : Example 2 : Python3 # import package import turtle # list to store ids ids = [] # loop to create motion # with stamps for i in range(12): # motion turtle.forward(50) # stampid id = turtle.stamp() lst.append(id) turtle.right(30) # hide the turtle for # better understandings turtle.ht() # loop for clear stamps with # their ids using clearstamp # half stamps are cleared for i in range(len(lst)//2): turtle.clearstamp(lst[i]) Output : Comment More infoAdvertise with us Next Article turtle.up() method in Python D deepanshu_rustagi Follow Improve Article Tags : Python Python-turtle Practice Tags : python Similar Reads turtle.clearstamps() method 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.clearstamps() The turtle.clearstamps() method is used to delete all or first 2 min read turtle.backward() method 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.backward() The turtle.backward() method is used to move the turtle backward 1 min read turtle.up() method 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.up() The turtle.up() method is used to pull the pen up from the screen. It g 1 min read turtle.down() method 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.down() The turtle.down() method is used to pull back the pen down on the scr 1 min read turtle.pos() method 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.pos() This method is used to find the turtle's current location (x, y), as a 2 min read turtle.pos() method 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.pos() This method is used to find the turtle's current location (x, y), as a 2 min read Like