On Dec 11, 2007, at 5:14 PM, katie smith wrote: > "[16, 16, 2, 16, 2, 16, 8, 16]"
Regular expressions might be a good way to handle this.
import re
s = '[16, 16, 2, 16, 2, 16, 8, 16]'
get_numbers = re.compile('\d\d*').findall
numbers = [int(x) for x in get_numbers(s)]
See:
http://docs.python.org/lib/module-re.html
---
Lee Capps
Technology Specialist
CTE Resource Center
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
