Just an FYI, what you presented in the question is a list of lists, not a list of tuples. Maybe your code is different than what you showed here, but I doubt you are using tuples since they are immutable and you would be getting errors trying to update values in them.
Before suggesting a solution, what would happen in your 15 appearances example? You state there would be 2 groups of 7, what would the ID sequence look like after it is modified?
If your question is about getting lost within Lists of Lists and how to reference particular elements within python... maybe this would help python - Access item in a list of lists - Stack Overflow Again as Joshua indicated we are only guessing at what you need?