Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

turtle.write_docstringdict() function in Python

  • Last Updated : 19 Oct, 2021

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.


This method is used to Create and write a docstring-dictionary to file.



Has to be called explicitly, (not used by the turtle graphics classes). The docstring dictionary will be written to the Python script <filename>.py. It is intended to serve as a template for translation of the docstrings into different languages.

Below is the implementation of the above method with an example :


# importing package
import turtle
# making docstringdictionary file

Output :

Here, we can see an output file with the name “” which stores the description of turtle methods with examples. All the content is stored in the form of a dictionary ( Key-Value pair ) where :

  • Key: method name
  • Value: Description with examples

 Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.  

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning - Basic Level Course

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!