So, I currently have a pretty convoluted list of lists of lists, that I've been able to manage pretty easily; however, I've had to essentially duplicate that list X times as the data thats being stored is now being divided even more.
Essentially it consists of
#ALL CARDS
[
#CARD 0
[
#Component 0
[
#0
[ #A
#Time, Min, Avg, Max
[[], [], [], []],
#B
#Time, Min, Avg, Max
[[], [], [], []]
],
#1
[ #A
#Time, Min, Avg, Max
[[], [], [], []],
#B
#Time, Min, Avg, Max
[[], [], [], []]
],
#2
[ #A
#Time, Min, Avg, Max
[[], [], [], []],
#B
#Time, Min, Avg, Max
[[], [], [], []]
],
#3
[ #A
#Time, Min, Avg, Max
[[], [], [], []],
#B
#Time, Min, Avg, Max
[[], [], [], []]
],
#4
[ #A
#Time, Min, Avg, Max
[[], [], [], []],
#B
#Time, Min, Avg, Max
[[], [], [], []]
],
],
#Component 1
[
#Time A, Time B, Value A, Value B (repeated 5 times for each sub component)
[[], [], [], []],
[[], [], [], []],
[[], [], [], []],
[[], [], [], []],
[[], [], [], []]
],
#Time, Min, Avg, Max for each of the components below. They are single instances and have no sub like the above 2
[[], [], [], []], #Component 2
[[], [], [], []], #Component 3
[[], [], [], []], #Component 4
[[], [], [], []], #Component 5
[[], [], [], []], #Component 6
[[], [], [], []], #Component 7
[[], [], [], []], #Component 8
[[], [], [], []], #Component 9
[[], [], [], []], #Component 10
[[], [], [], []] #Component 11
],
#INTF Card 1-3 Set up Same way
^ This structure is taken directly from a print out of the empty list.
NOW, the issue is, that when I'm parsing through text to grab the values and store them in their respective spots, I'm getting duplicates, despite the fact that I'm intentionally calling out specific spots in the list.
An example is when I try to .append() a value to it such as
all_cards[0][2][0].append("4")
it will append the value 4 to the first list (Time) in the Component 2 list, BUT it will append it to each card (0-3), instead of just the Card 0 like is being called out by the "all_cards[0]" part.
I DO understand this isn't the best way to have built up this data, but the program got feature-creeped, and I am trying to get a working version usable before I try to rewrite to get a chance to rewrite this entire program....
If anyone knows why this data is duplicating across each card in the all_cards list it'd be appreciated thanks.
I've tried indexing the list in different ways, but keep either ending out of range, or getting duplicates across cards