I have integer data as follows in a .txt file.
600 17 3488541
601 21 6523232
602 18 6565444
603 23 6655656
It goes on like that. The file is pretty huge. In a specific program I need to get each of the values in a line into an integer variable and use it and then the values in the next line and so on.
I have gone through a lots of tutorials but nothing explains how to do my purpose.
To be specific, here is what I need exactly. I have three variables, say a, b and c.
All these 3 variables are initialized in a while-loop. In the first execution of the while loop the values must be:
a=600
b=17
c=3488541
In the second execution it has to be:
a=601
b=21
c=6523232
…and so on. How can I do it? I am a beginner in Python. The working platform is Linux.
1 Answer