Dec-15-2016, 04:48 AM
i want to get the string that is between (the first instances of) two strings, a and b (in that order). i can do it like:
what_was_between = original_string.split(a)[1].split(b)[0]is there a shorter, sweeter, and/or more elegant way? i am dreaming of:
def between(s,a,b): return s.split(a)[1].split(b)[0]should i go with that?
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.