This gives you a list of lists, each of the inner ones has the street part and the suburb partstreetList = [
"13 Kent Street Gordon",
"22 King Road Soho",
"123 Kong Lane Foggy Bottom",
"76 Inglis Avenue Don't Go Here",
"300 4th Street Adams Morgan"]
kindList = ["Street", "Road", "Lane", "Avenue", "Trail"]
newList = []
for street in streetList:
for kind in kindList:
if kind in street:
where = street.find(kind)
kindLen = len(kind)
div = where + kindLen
streetPart = street[:div]
suburbPart = street[div:]
newList.append([streetPart, suburbPart])
print newList
The output is:[['13 Kent Street', ' Gordon'], ['22 King Road', ' Soho'], ['123 Kong Lane', ' Foggy Bottom'], ['76 Inglis Avenue', " Don't Go Here"], ['300 4th Street', ' Adams Morgan']]and you can use this output in a cursor to set the divided fields.