Here is my code:
variables = [0, 0, 0, 0]
while (variables[2]<4):
with open('vystup_online.txt') as f:
for line in f:
variables = (line.strip().split())
print variables[2]
and here's my .txt file:
2 10.249402 0.000000 25.596176
I was assuming it will print variables[2] until I change the file to:
2 10.249402 1.000000 25.596176
or similar.
I am just getting
>>>
0.000000
and nothing more. What's wrong?
This is what I need:
>>>
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
...