[Tutor] a question about list

Lin Jin jinlin555 at msn.com
Thu Nov 11 23:43:03 CET 2004


i am new to python.i have a question about list.if i have two list:
a=[a,b,c,d,e,f,g]
b=[1,2,4]
and i want to remove the element of a using b,that is i want a=[a,d,f,g],my 
code is like this:
>>>for i in b:
>>>    del a[b]

but it is not working, it can't remove the correct items.what should i do 
to make it correct?thx

_________________________________________________________________
Ãâ·ÑÏÂÔØ MSN Explorer:   http://explorer.msn.com/lccn/  



More information about the Tutor mailing list