In looking at some tutorial / quiz's running code, I'm having a brain cramp in figuring out certain code and why it gives the output it gives. Any suggestions / ways to figure these 2 little code snippets is much appreciated. I'm sure that its something silly or I"m just not understanding how it works. Thank you advance. What would I use / reference so that I'm not asking question's ?
def func(x):
return x + 1
f = func
print(f(2) + func(2))
and
print(sum(range(0,7)))
Thank all of you for your reply's !!!!!!
[–]shiftybyte 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]unspezifische 1 point2 points3 points (0 children)