fork(1) download
  1. import re
  2.  
  3. s = "xaz xazx xaxsza zsxdaszdx zasxz xaaz xaaaz"
  4. print([x for x in s.split() if x.startswith('x') and x.endswith('z')])
Success #stdin #stdout 0s 23304KB
stdin
Standard input is empty
stdout
['xaz', 'xaaz', 'xaaaz']