Check Your Test With a Text File

Let's test our text file and see how it works.

The doctest module also allows us to write interactive examples to a text file using ReStructuredText, which is a common mark-up language. Let’s create a really simple example. Create the following file and name it add.txt:

Get hands-on with 1400+ tech skills courses.