fork download
  1. lines = ['Some text 1 line 22 here', 'Some text 2 Text2 22 here', 'Some text 3 Text3 22 here']
  2. good = [s for s in lines if ' 22 'in s and 'line 22 ' not in s]
  3. print(good)
Success #stdin #stdout 0s 9024KB
stdin
Standard input is empty
stdout
['Some text 2 Text2 22 here', 'Some text 3 Text3 22 here']