Erich schrieb:
> This is like split() but returns a list of exactly lenght n. This is
> very useful when using unpacking, e.g.:
> x, y = nsplit('foo,bar,baz', ',', 2)

You could use the second argument of split:

   x, y = 'foo,bar,baz'.split(',', 1)

Note that the number has the meaning "only split n times" as opposed to 
"split into n parts".

Cheers,
   Robin
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to