That requires reading the whole file. For small files that's not a problem, but as a general thing you should only read as much at a time as you need. For that reason for loops and other techniques that read all the lines of a file into a list or array should be avoided unless you actually need random access to the whole file.
In reply to Re^2: How to check if a file has more than one line?
by GrandFather
in thread How to check if a file has more than one line?
by bobo33+
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |