#Remove leading and trailing whitespaces.
str_Variable = " Python is a programming language. "
strip_Variable = str_Variable.strip() # use strip() method of string
print(strip_Variable) # Output: Python is a programming language.