Roy Smith: > But, along those lines, I've often thought that split() needed a way to not > just limit the number of splits, but to also throw away the extra stuff. > Getting the first N fields of a string is something I've done often enough > that refactoring the slicing operation right into the split() code seems > worthwhile. And, it would be even faster :-)
Given the hypothetical .xsplit() string method I was talking about, it's then easy to use islice() on it to skip the first items: islice(sometext.xsplit(), 10, None) Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list