On Jan 16, 8:34 am, Andre <[EMAIL PROTECTED]> wrote:
> Hi there
>
> Is there a function like strptime, which takes a string and converts it
> into an array depending on a format string I provide. Like:>>> a = 
> '3456\tblub-blib.0.9'
> >>> b = '%d\t%s-%s.%f'
> >>> c = mysticalfunction(a,b)
> >>> print c
>
> [3456,'blub','blib',0.9]

Use regular expressions: see http://docs.python.org/lib/node49.html

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

Reply via email to