Feb-12-2021, 09:04 AM
Hi,
(Of course you need proper indentation, and f strings are easier)
But if I take your original code and run it in IDLE, (and replace the file with a list of numbers)
it outputs exactly what you would like it to do.
So I suppose the file contains a CRLF on each line, that you should strip first.
Paul
(Of course you need proper indentation, and f strings are easier)
But if I take your original code and run it in IDLE, (and replace the file with a list of numbers)
it outputs exactly what you would like it to do.
So I suppose the file contains a CRLF on each line, that you should strip first.
Paul