simple string search and replace

Kun neurogasm at
Sat Mar 25 21:53:47 CET 2006

hey guys, here's my code,

senders = [('460 (BODY[HEADER.FIELDS (FROM)] {46}', 'From: Friend 
<anon at>\r\n\r\n'), ')', ('462 (BODY[HEADER.FIELDS 
(FROM)] {37}', 'From: Kun <neurogasm at>\r\n\r\n'), ')']
print senders
parsed_senders = []
sender = ""
for item in senders:
    if isinstance(item,tuple):
       item= ''.join(item)
    if item==')':
       sender = ""
print parsed_senders

wondering if anyone knows how i can remove the '>'s from the list, which 
outputs to something like ['anon at>', 'neurogasm at>']

More information about the Python-list mailing list