title: Python split string with a list of words
body: <p>Trying to split my address string with </p>
  
  <pre><code>apts = {'apt','apartment','unit','spc','space','trlr','lot','A','B','C','D'}
  </code></pre>
  
  <p>could it be done any better way than</p>
  
  <pre><code>fulladdress.split("apt")
  fulladdress.split("apartment")
  ...
  ...
  </code></pre>
  
  <p>was trying to make </p>
  
  <pre><code>def split_all(text, dict):
  for i in dict():
      text = text.split(i)
  return text
  
  s = split_all(s,apts)
  </code></pre>
  
  <p><code>"fulladdress = "213 house rd apt 1011"</code> I want to get <code>"213 house rd 1011"</code></p>
  
  <p>didn't work out. I feel like missing something</p>