hey guys, here's my code,
senders = [('460 (BODY[HEADER.FIELDS (FROM)] {46}', 'From: Friend
<anon@anon.whar ton.com>\r\n\r\ n'), ')', ('462 (BODY[HEADER.FIELDS
(FROM)] {37}', 'From: Kun <neurogasm@gmai l.com>\r\n\r\n' ), ')']
print senders
parsed_senders = []
sender = ""
for item in senders:
if isinstance(item ,tuple):
item= ''.join(item)
if item==')':
parsed_senders. append(sender[sender.find('<' )+1:].strip())
sender = ""
else:
sender+=item
print parsed_senders
wondering if anyone knows how i can remove the '>'s from the list, which
outputs to something like ['anon@anon.whar ton.com>', 'neurogasm@gmai l.com>']
senders = [('460 (BODY[HEADER.FIELDS (FROM)] {46}', 'From: Friend
<anon@anon.whar ton.com>\r\n\r\ n'), ')', ('462 (BODY[HEADER.FIELDS
(FROM)] {37}', 'From: Kun <neurogasm@gmai l.com>\r\n\r\n' ), ')']
print senders
parsed_senders = []
sender = ""
for item in senders:
if isinstance(item ,tuple):
item= ''.join(item)
if item==')':
parsed_senders. append(sender[sender.find('<' )+1:].strip())
sender = ""
else:
sender+=item
print parsed_senders
wondering if anyone knows how i can remove the '>'s from the list, which
outputs to something like ['anon@anon.whar ton.com>', 'neurogasm@gmai l.com>']
Comment