turtle.hideturtle() function in Python
Last Updated :
17 Jul, 2020
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 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
import turtle
turtle.forward( 100 )
turtle.hideturtle()
|
Output :
Example 2 :
Python3
import turtle
turtle.circle( 80 )
turtle.hideturtle()
|
Output :
Without hiding the turtle
Hiding the turtle
Share your thoughts in the comments
Please Login to comment...