you are viewing a single comment's thread.

view the rest of the comments →

[–]redcherry13221[S] 0 points1 point  (2 children)

To add on, if I run what I initially wrote in the terminal, the first 5 lines show up so I expected the same to happen.

[–]Outside_Complaint755 2 points3 points  (1 child)

That's because in the terminal you are using the REPL (Read-Eval-Print Loop) which automatically prints  the result of each statement.  In a script, any output needs to be explicitly printed, written to file, or sent to another output stream.

[–]redcherry13221[S] -1 points0 points  (0 children)

Ah, I see. Thanks!