Extracting elements over multiple lists?

Prasad, Ramit ramit.prasad at jpmorgan.com
Tue Nov 15 12:01:23 EST 2011


>>for x in a, b, c:
>>    del x[0]
>for arr in [a,b,c]:
>  arr.pop(0)

>(Peter's "del" solution is quite close, but I find the 'del' statement 
>tricky in python and will mislead many python newcomers)

Can you expand on why 'del' is "tricky"/misleading?

Ramit


Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423

--

This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  



More information about the Python-list mailing list