import pandas as pd
import numpy as np
df=pd.read_csv('data.txt', sep=',',header=None)
print(df.head(8))
sol = df.to_numpy()
print(sol)
0 1 2 3 4 0 1 3 4 5 6 1 1 4 5 10 14 2 2 7 8 12 15 3 2 8 9 12 13 4 3 7 9 11 15 5 3 10 11 13 14 6 6 7 11 13 15 7 6 9 10 11 14 [[ 1 3 4 5 6] [ 1 4 5 10 14] [ 2 7 8 12 15] [ 2 8 9 12 13] [ 3 7 9 11 15] [ 3 10 11 13 14] [ 6 7 11 13 15] [ 6 9 10 11 14]]
it = np.nditer(sol, flags=['f_index'],order='C')
for x in it:
print(f"{it.index}--{x}")
0--1 8--3 16--4 24--5 32--6 1--1 9--4 17--5 25--10 33--14 2--2 10--7 18--8 26--12 34--15 3--2 11--8 19--9 27--12 35--13 4--3 12--7 20--9 28--11 36--15 5--3 13--10 21--11 29--13 37--14 6--6 14--7 22--11 30--13 38--15 7--6 15--9 23--10 31--11 39--14