Skip to content
Related Articles
Open in App
Not now

Related Articles

turtle.write_docstringdict() function in Python

Improve Article
Save Article
  • Last Updated : 19 Oct, 2021
Improve Article
Save Article

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
My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!