add strip to remove extra whitespace in python3