turtle.getpen() function in Python Last Updated : 23 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.getpen() This function is used to return the Turtleobject itself. It doesn't require any argument. Syntax : turtle.getpen() Below is the implementation of the above method with some examples : Example 1 : Python3 # import package import turtle # get turtle object # and store it turt=turtle.getpen() # print turtle object print(turt) Output : <__main__.Turtle object> Example 2 : Python3 # import package import turtle # get turtle object # and store it turt=turtle.getpen() # use it for turtle methods turt.width(5) turt.color("blue") turt.shape("turtle") turt.forward(150) Output : Comment More infoAdvertise with us Next Article turtle.getpen() function in Python D deepanshu_rustagi Follow Improve Article Tags : Python Python-turtle Practice Tags : python Similar Reads turtle.getscreen() 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.getscreen() This function is used to Return the TurtleScreen object, the tur 1 min read turtle.getshapes() 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.getshapes() This function is used to return a list of names of all currently 1 min read turtle.get_poly() function in Python he 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.get_poly() This function is used to return the lastly recorded polygon. It do 1 min read turtle.home() 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.home() This function is used to move the turtle to the origin i.e. coordinat 1 min read turtle.heading() 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.heading() This function is used to return the turtle's current heading. It d 1 min read turtle.hideturtle() 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.hideturtle() This method is used to make the turtle invisible. It's a good i 1 min read turtle.isdown() 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.isdown() This method is used to check whether the turtle is down or not. It 1 min read turtle.onkey() 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.onkey() This function is used to bind fun to the key-release event of the ke 1 min read turtle.get_shapepoly() 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.get_shapepoly() This method is used to return the current shape polygon as a 2 min read turtle.dot() 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.dot()This function is used to draw a circular dot with a particular size, wi 2 min read Like