""" A module to extract the middle third of a string Author: Walker M. White Date: August 31, 2017 (Python 3 Version) """ def middle(text): """ Returns: the middle 3rd of text Parameter text: The text to cut up Precondition: text is a string """ # Get length of text size = len(text) # Start of middle third start = size//3 # End of middle third end = 2*size//3 # Get the text result = text[start:end] # Return the result return result