zipfile module
pytest is a module that needs to be installed before it can
be used.
doctest module
def age(y):
'''
Given the year which you were born,
return your current age.
>>> age(2026) # Write your test cases in docstring
0
>>> age(1999)
27
'''
return 2026 - y
import doctest
doctest.testmod(verbose=True)
print statements to learn about the code
behavior, but where to put the print statements
is an art more than a science.
"dan" in word.lower()
to the Watch section to see the True/False value.
<module> shown in the Call Stack
section refers to the main function.
s = '> > > > > Hello'; s.lstrip('> ') will remove
those leading '> ' and get you
"Hello".
x = filecmp.dircmp(dirname1, dirname2); x.report() # This one is good