I am webscraping descriptions under images from a website and I am currently trying to scrape the descriptions using BeautifulSoup.
But that is working, some of the descriptions have one or more trailing spaces that I want to get rid of. How do I check if a string in a list has any trailing spaces and then to get rid of all the trailing spaces in each string of the list?