On 6/10/2010 1:47 PM Anthony Papillion said...
Someone helped me with some code yesterday and I'm trying to
understand it. The way they wrote it was

subjects = (info[2] for info in items)

Perhaps I'm not truly understanding what this does. Does this do
anything different than if I wrote

for info[2] in items
    subject = info[2]


more like:

result = []
for info in items:
  result.append(info[2])

subjects =iter(result)

Emile

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to