Basically, I want to make a grid with school subjects and all the test results I got from it, and I want to display about 10 results for every subject.
Like this:
...
--------------------------------------------------------------------
English| 7.4 | 6.4 | 9.5 | 4.5 | 8.9 | 3.9 | 8.0 | 6.5 | 9.9 | 4.9 |
--------------------------------------------------------------------
Dutch | Results
...
And I made basically two FOR loops, one reading every school subject out of a list and one that reads every result out of a list. However, I want them to complete without going "stuck" in the next loop. How do I do this? Do I thread the two loops and make a time delay so the values are readable every x seconds? (Probably not this, this is very slow)
Code:
...
for item in store: #Loop that reads the subjects
with open("matrixcontent.dat", "r") as matrixcontent_open:
lines = matrixcontent_open.readlines() #Lines are test results
for line in lines:
print(item + "|" + line + "\n" + ("-------------" * 7))
#I want this last line to print the subject and than all the results
EDIT:
With the solution (somewhat) down below, it will print all the test results, but It will print it wrong. How do I manage to print all the test results in one individual column/row? I would like all these number to be in the NTL (Dutch) row.
NTL | 7.2
ETL | 8.4
WIB | 6.7
WID | 5.3
ICT | 4.8
NAS | 9.4