User:Laura Macchini/code/between

From XPUB & Lens-Based wiki
< User:Laura Macchini
Revision as of 17:04, 3 November 2011 by Laura Macchini (talk | contribs) (Created page with "<source lang="python"> def between(left,right,s): before,_,a = s.partition(left) a,_,after = a.partition(right) return before,a,after </source>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
def between(left,right,s):
	before,_,a = s.partition(left)
	a,_,after = a.partition(right)
	return before,a,after