def make_services(routes_data):
routes = []
curr_route = []
x = split_routes(routes_data)
service_data1 = x[1] # (’106’, [(’106’, ’1’, ’1’, ’43009’), ..
you return only [(tuple([service_code] + [l] + [[curr_route]]))]
which is only one entry,
this is why you get only:
[('106', ['1', '2'], [['43009', ... '43009']])]
you need to store all entries in one list, say, results
and append to it each entry in your loop, something like:
results.append(tuple([service_code] + [l] + [[curr_route]]))
and return:
return results