Python create list of strings from text for each string between \n

I am working on a project where I am scraping data from a website. This data comes in a string, with newline charachters and other expressions in between each item.

example:

['\nApple Pie\n\xa0\nPineapple Pizza\n\xa0\nChocolate Fudge']

I would like to create a list of words for each item here, so the end result should look like

['Apple Pie', 'Pineapple Pizza', 'Chocolate Fudge']

Can anyone here help me with a regex or another way to get these items in a list?

Thanks!



from Recent Questions - Stack Overflow https://ift.tt/3koi5He
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)