What is the output of the following code ?
L = [] def foo(y): if y == 0: return L num = y % 2 L.append(num) foo(y//2) foo(6) L.reverse() for i in L: print(i, end=" ")
Here foo() function calls it self until y value becomes zeroOn every call it doe a floor division foo(y//2) and call it self
foo(y//2)
Comment here: