Parsing variables out of python lines

Duncan Booth duncan at rcp.co.uk
Mon Oct 7 10:05:24 CEST 2002


Mark <Hobbes2176 at yahoo.com> wrote in
news:ua9o9.18914$Mw4.5131 at nwrddc01.gnilink.net: 

> for junk, item, rest1, rest2, rest3 in t:
<snip>
> 
> Anyone know how to clean up the tuple assignment (I only
> want item, 
> the rest could go to /dev/null if they want). 

I tend to use '_' for unwanted values. e.g.

   for _, item, _, _, _ in t:




More information about the Python-list mailing list