Remove trailing whitespace from library attributes

Use the strip method.