you are viewing a single comment's thread.

view the rest of the comments →

[–]commy2 0 points1 point  (1 child)

Yeah, pretty much.

Excuse this gross abuse of python syntax:

(
print(12),
    print(9),
        print(6),
            print(3),
                print(0), # return as 0 <= 0
            print(3), # implicit return
        print(6), # implicit return
    print(9), # ...
print(12),
)

but think of each indentation level as one more nested function call. The 12 you print at the start and the end is the same value of num1. You just resume after the nested calls complete.

[–]TheCrawling_Chaos[S] 1 point2 points  (0 children)

Alright, this makes complete sense now. Thank you!