Use re.split, as this is the fastest and cleanest way. However, iff you have to split a lot of strings, the best is:
import re delimiters = re.compile('_| ') def split(x): return delimiters.split(x) >>> split('this_NP is_VL funny_JJ') ['this', 'NP', 'is', 'VL', 'funny', 'JJ'] Stani -- SPE - Stani's Python Editor http://pythonide.stani.be -- http://mail.python.org/mailman/listinfo/python-list