I've looked at previous answers to this (python how to remove this n from string or list, remove a list item from a list and python remove whitespace in string) but can't get the solutions to work.
I have a list with a single element like so:
list = [u'\r\n\r\n\r\n \r\n \r\n \r\n 123 Main St., Peoria\r\n \r\n\r\n \r\n |\r\n \r\n \r\n \r\n \r\n 123-456-789\r\n \r\n \r\n \r\n ']
It has an address and a phone number and what I'd like is just to have this returned is:
123 Main St., Peoria;123-456-789
I've tried stuff like:
str(list).strip(' \r\n\t')
and
str(list).replace('\r','')
But they don't work, so I'm thinking maybe it's a unicode issue? How do I get around it?