I have a routes list like this:
routes=
[[(0, 1), (1, 6), (6, 7), (7, 10), (10, 9), (9, 0)],
[(0, 2), (2, 3), (3, 4), (4, 5), (5, 0)],
[(0, 8), (8, 0)]]
Route 1 is from 0 to 1 to 6 to 7 and so on .... how can i transform this list into a list like this:
routes_new= [[0, 1, 6, 7, 10, 9, 0], [0, 2, 3, 4, 5, 0],[0,8,0]]
Thanks a lot!