fork download
  1. s = 'is2 Thi1s T4est 3a'
  2. res = ' '.join(sorted(s.split(), key=lambda x: next(c for c in x if c.isdigit())))
  3. print(res)
Success #stdin #stdout 0.02s 9116KB
stdin
Standard input is empty
stdout
Thi1s is2 3a T4est