python Programming Glossary: split_on
Split a list into nested lists on a value http://stackoverflow.com/questions/4322705/split-a-list-into-nested-lists-on-a-value original begin end for begin end in zip begins ends ryan split_on from functools import reduce def split_on seq delims remove_empty.. begins ends ryan split_on from functools import reduce def split_on seq delims remove_empty True '''Split seq into lists using delims.. lists using delims as a delimiting elements. For example split_on delims 2 list xrange 0 5 yields 0 1 3 4 . delims can be either..
|