"Tim Williams" <[EMAIL PROTECTED]> writes:
> or even more terse,
> >>> print '\n'.join([i for i in s.splitlines ()[1::2]])

I think it's more robust to use a regexp.

  prices = re.findall('\$\d+\.\d\d', s)
  print '\n'.join(prices)
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to