fork download
  1. text = "lorem ipsum buzz mezzo mix zztop but this is all"
  2.  
  3. words = [word
  4. for word in text.split()
  5. if not (word.startswith("zz") or word.endswith("zz")) and "zz" in word]
  6.  
  7. print(words)
Success #stdin #stdout 0.02s 9112KB
stdin
Standard input is empty
stdout
['mezzo']