Substitute multiple whitespace with single whitespace in Python,""""""" """""".join(mystring.split())"