turtle.hideturtle()
This method is used to make the turtle invisible. It’s a good idea to do this while you’re in the middle of a complicated drawing because hiding the turtle speeds up the drawing observably. This method does not require any argument.
Syntax:
turtle.hideturtle() or turtle.ht()
Below is the implementation of the above method with some examples :
Example 1 :
Python3
# importing package import turtle # forward turtle by 100 turtle.forward( 100 ) # hide the turtle turtle.hideturtle() |
Output :
Example 2 :
Python3
# importing package import turtle # draw a circle turtle.circle( 80 ) # hide the turtle turtle.hideturtle() |
Output :
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.