For example, if I had the following string:
\"this-is-a-string\"
Could I split it by every 2nd \"-\" rather than every \"-\" so that it returns two values (\
l = 'this-is-a-string'.split() nl = [] ss = "" c = 0 for s in l: c += 1 if c%2 == 0: ss = s else: ss = "%s-%s"%(ss,s) nl.insert(ss) print nl