Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 6 years ago

Iguananaut gravatar image

Just use print() around the last line in the loop, or append the sum() results to a list and show that. I don't think the Notebook works in such a way w.r.t. in output from loops, since technically the for loop has no output. It's just expressions that have a single value that are output normally.

click to hide/show revision 2
No.2 Revision

Just use print() around the last line in the loop, or append the sum() results to a list and show that. I don't think the Notebook works in such a way w.r.t. in output from loops, since technically the for loop has no output. It's just expressions that have a single value that are output normally.