In python how to know if the characters of a string are whitespace?