(Oct-10-2022, 03:55 AM)Calli Wrote: It looks like it's printing out the last line of the file
(Oct-10-2022, 07:06 AM)ibreeden Wrote: Is'nt that what you wanted? You want more? Then add 4 spaces before the print function.
Indeed: move the
print()
function into the for
loop.To add..
Either that, or provide a bigger sample (say 10 records) and I'll sort it out: reading (what was it... looking back) ... there we go, 3,000,000 records into memory is not good practice, as we can do this one record at time.
Sig:
>>> import this
The UNIX philosophy: "Do one thing, and do it well."
"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse
"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
>>> import this
The UNIX philosophy: "Do one thing, and do it well."
"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse
"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein