fork download
  1. import re
  2. slist = ["-args", "-111111", "20-args", "20 - 20", "20-10", "args-deep"]
  3. nlist = list()
  4. for estr in slist:
  5. nlist.append(re.sub(r"-(?=[a-zA-Z])", " ", estr).lstrip())
  6. print (nlist)
Success #stdin #stdout 0.02s 27712KB
stdin
Standard input is empty
stdout
['args', '-111111', '20 args', '20 - 20', '20-10', 'args deep']