Y
Yazar Yolait
I have a string of numbers in a file like so:
0 3 23.3 352 45 4
4 45 23 54 4 5.4 .6
I need to average them horizontally and vertically. Horizontally is easy
since I'm reading one line at a time, but how can I do it vertically like 0
and 4, 3 and 45, etc.
I was thinking of a dictionary but how do you add entries to a dictionary,
you can't can you? Like I would add 0 to a dictionary that holds the 0th
column. And then when I get to line 2, I would add 4 to the dictionary
which has the 0th column data.
0 3 23.3 352 45 4
4 45 23 54 4 5.4 .6
I need to average them horizontally and vertically. Horizontally is easy
since I'm reading one line at a time, but how can I do it vertically like 0
and 4, 3 and 45, etc.
I was thinking of a dictionary but how do you add entries to a dictionary,
you can't can you? Like I would add 0 to a dictionary that holds the 0th
column. And then when I get to line 2, I would add 4 to the dictionary
which has the 0th column data.