fork download
  1. string = "I am 20 years old. I live in New York in United States of America."
  2. stop = ["am", "old", "in", "of"]
  3. z = list(set(string.split()) - set(stop))
  4. print(z)
Success #stdin #stdout 0.03s 9440KB
stdin
Standard input is empty
stdout
['United', '20', 'I', 'live', 'years', 'States', 'America.', 'York', 'New', 'old.']