Use str.strip with default arguments to strip whitespaces