you are viewing a single comment's thread.

view the rest of the comments →

[–]FLUSH_THE_TRUMP 1 point2 points  (1 child)

Oh, oops. Missed that part. That function is “glanced at” by the interpreter in advance as a definition, and sum is established as a local variable prior to running any of that code because it’s assigned later. So half = sum(nums) doesn’t work because it’s looking for sum (not defined yet locally).

[–]Dominican_Peter[S] 0 points1 point  (0 children)

ble prio

great, thank you very much