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