I have a list of coordinates that are generated by an android app. What I want is to automatically split the list every time it finds the element (0.0,0.0) into another list and when it finds the next (0.0,0.0) it will split that into another list and so on. The number of elements (0.0,0.0) depends on how many times I run the app, so in the example, I ran the app 3 times but if I had run 4 I would need to split the big_list into 4 lists. With that, the size of the big_list and the number of (0.0,0.0) elements that determine the number of splits depends on how many times I ran the app before I export the file from the database and load it on python to do the analysis.
Here's the example:
big_list = [**(0.0, 0.0)**, (0.7061503529548645, -0.5579889416694641), (1.412300705909729, -1.1159778833389282), (2.1184511184692383, -1.673966884613037), (2.824601411819458, -2.2319557666778564), **(0.0, 0.0)**, (0.6936703324317932, -0.573429524898529), (1.3873406648635864, -1.146859049797058), (2.0810110569000244, -1.7202885150909424), (2.7677958011627197, -2.3019471168518066), **(0.0, 0.0)**, (0.6973708868026733, -0.5689234137535095), (1.3947417736053467, -1.137846827507019), (2.0921125411987305, -1.7067701816558838), (2.7894835472106934, -2.275693655014038), (3.4868545532226562, -2.8446171283721924), (4.184225559234619, -3.4135406017303467)]
And what I want is 3 lists starting with the element (0.0,0.0) and the following elements until finds the next (0.0,0.0) to split again:
list1 = [(0.0, 0.0), (0.7061503529548645, -0.5579889416694641), (1.412300705909729, -1.1159778833389282), (2.1184511184692383, -1.673966884613037), (2.824601411819458, -2.2319557666778564)]
list2= [(0.0, 0.0), (0.6936703324317932, -0.573429524898529), (1.3873406648635864, -1.146859049797058), (2.0810110569000244, -1.7202885150909424), (2.7677958011627197, -2.3019471168518066)]
list3 = [(0.0, 0.0), (0.6973708868026733, -0.5689234137535095), (1.3947417736053467, -1.137846827507019), (2.0921125411987305, -1.7067701816558838), (2.7894835472106934, -2.275693655014038), (3.4868545532226562, -2.8446171283721924), (4.184225559234619, -3.4135406017303467)]