John Zenger wrote: >>>>print [x for x in items if x != ''] > > ['SRCPARAM', '1', '6.35e-07', '15.00', '340.00', '1.10', '3.0'] >
This can be shortened to
[x for x in items if x]
James
--
http://mail.python.org/mailman/listinfo/python-list
John Zenger wrote: >>>>print [x for x in items if x != ''] > > ['SRCPARAM', '1', '6.35e-07', '15.00', '340.00', '1.10', '3.0'] >
This can be shortened to
[x for x in items if x]
James
--
http://mail.python.org/mailman/listinfo/python-list