Hi, 

Is there a way to apply multiple actions within one list comprehension?

i.e. instead of 

a = []
for i in x:
    i.pop(3)
    g = [ int(item) for item in i]
    a.append(g)

Is there any guides to this (possibly obtuse) tool?

Regards, 

Liam Clarke

PS I can see how nested list comprehensions can quickly lose readability. 

-- 
'There is only one basic human right, and that is to do as you damn well please.
And with it comes the only basic human duty, to take the consequences.
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to