I am trying to use strip() to trim off the space before and after a string. It works fine for
strip()
str1 = \" abdced \" str1.strip()
H
strip is not an in-place method, meaning it returns a value which must be reassigned like so:
strip
str1 = str1.strip() # the string is reassigned to the returned stripped string