def splot(data):
    while True:
        yield data
pre, sep, data = data.partition(', ')
if not sep:
    return
location_in = 'London, Greater London, England, United Kingdom'
location_out = list(splot(location_in))
Python - convert comma separated string into reducing string list