fork download
  1. import re
  2. s1 = 'Arithmetic Return 2018 (%)'
  3. s2 = 'Arithmetic Return 2019 (%)'
  4.  
  5. p = re.compile(r'^.*?Arithm.*$')
  6. w = [p.findall(a) for a in [s1, s2]]
  7. print(w)
Success #stdin #stdout 0.02s 27728KB
stdin
Standard input is empty
stdout
[['Arithmetic Return 2018 (%)'], ['Arithmetic Return 2019 (%)']]