need to make a csv file.(not as important, but due to the large size, i thought this would be for the best.)
in the first column there is value of [3,3,3] all the way until [-3,-3,-3] in the second column. it is the same as first column, [3,3,3] to [-3,-3,-3].
so how it works is that for every unqiue occrance of the first column, the value of second column will go through [3,3,3] to [-3,-3,-3]
for example.
[3,3,3], [3,3,3]
[3,3,3], [3,3,2]
[3,3,3], [3,3,1]
[3,3,3], [3,3,-1]
[3,3,3], [3,3,-2]
[3,3,3], [3,3,-3]
[3,3,3], [3,2,2]
[3,3,3], [3,2,1]
[3,3,3], [3,2,-1]
...
[3,3,3], [3,2,-3]
...
[3,3,2],[3,3,3] # since the first column changed, it will repeat [3,3,3] to [-3,-3,-3] in the second column
...
[3,3,2] [-3,-3,-3]
there can't be repeats in both columns. this is considered a repeat [3,1,3] and [3,3,1] where in both occurnace 3 shows up twice and 1 shows up once. there also can't be 0 in either columns. meaning once you are counting down from 3 to -3, it will go from 1, to -1.
so far my code looks like.
first_column = [3, 3, 3]
second_column = [3, 3, 3]
while second_column != [-3, -3, -3]:
print([first_column, second_column])
second_column[2] -= 1
if second_column[2] < -3:
second_column[2] = 3
second_column[1] -= 1
if second_column[1] < -3:
second_column[1] = 3
second_column[0] -= 1
this only do [3,3,3] first column. and it was repeating values and 0. it will be greatly appreciated if someone can appoint me to the right path, and also make the code look prettier.
please no chatgpt answers......it doesnt work there.
edit: overall this should make around 450,000 rows.