I have a file that has only numbers on each line. My question is, how do I convert each line from a string to an int?
I know i can do int(str) but how do I do this over each line of the file? I want to sum each number on each line and also count how many lines there are.
Ex of file contents:
> 5
> 3
> 5
> 90