Kun wrote:
> hey guys, here's my code,
>
> senders = [('460 (BODY[HEADER.FIELDS (FROM)] {46}', 'From: Friend
> <[EMAIL PROTECTED]>\r\n\r\n'), ')', ('462 (BODY[HEADER.FIELDS
> (FROM)] {37}', 'From: Kun <[EMAIL PROTECTED]>\r\n\r\n'), ')']
> print senders
> parsed_senders = []
> sender = ""
> for i
Generally, to remove a substring (like ">") from a string you can use
the replace method (that returns a new string):
>>> s = "...anon.wharton.com>..."
>>> s.replace(">", "")
'...anon.wharton.com...'
You can use it with something like:
print [s.replace(">", "") for s in parsed_senders]
or you ca
hey guys, here's my code,
senders = [('460 (BODY[HEADER.FIELDS (FROM)] {46}', 'From: Friend
<[EMAIL PROTECTED]>\r\n\r\n'), ')', ('462 (BODY[HEADER.FIELDS
(FROM)] {37}', 'From: Kun <[EMAIL PROTECTED]>\r\n\r\n'), ')']
print senders
parsed_senders = []
sender = ""
for item in senders:
if isinst