Python Docstring Example
From Michelle Craig's Python presentation at #CEMC12:
The part in red is a Python docstring, and the included test cases can be used to test your function, as shown below.
(str,str) -> bool
s1_new = ""
for i in range(0,len(s1)):
s1_new = s1_new + s1[len(s1)-i-1]
return s1_new == s2
To test the test cases in the docstring, type the following commands in the Python shell (after you have run your program):
>>> import doctest