I'm writing a script to parse specific data from each outlook email.
I wrote something to strip out all carriage returns, new space, and white spaces from my string before parsing it, but it's very ugly. Any ideas on making it more elegant?
messageStr = messageStr.replace("\r","")
messageStr = messageStr.split('\n')
messageStr = [i for i in messageStr if i != '']
messageStr = [i for i in messageStr if i != ' ']