The Wayback Machine - https://web.archive.org/web/20240204103559/https://www.geeksforgeeks.org/turtle-hideturtle-function-in-python/
Open In App
Related Articles

turtle.hideturtle() function in Python

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
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.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 :

Without hiding the turtle

Hiding the turtle

Don't miss your chance to ride the wave of the data revolution! Every industry is scaling new heights by tapping into the power of data. Sharpen your skills and become a part of the hottest trend in the 21st century.

Dive into the future of technology - explore the Complete Machine Learning and Data Science Program by GeeksforGeeks and stay ahead of the curve.


Last Updated : 17 Jul, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads
Complete Tutorials