Reformat code.  Remove reference to string.strip which is no longer available in python 3