> Thank you. That gives me something closer to a list, but the output is now: 
> ['939\n', '936\n', '937\n', '885\n', '886\n', '887\n', '171\n', '19\n', ...]

> Question: how do I get rid of the \n attached to each member in my list?

Choose:

map(int(map(string.strip, yourlist)) (Python 2.2)

[ int(x.strip()) for x in yourlist ] (Python 2.3)

( int(x.strip()) for x in yourlist ) (Python 2.4)


Best regards,
Henning Hraban Ramm
Südkurier Medienhaus / MediaPro
Support/Admin/Development Dept.
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to