What will be the output of the following Python code?
a = [1, 2, 3, 4, 5]
b = lambda x: (b (x[1:]) + x[:1] if x else [])
print(b (a))
a = [1, 2, 3, 4, 5]
b = lambda x: (b (x[1:]) + x[:1] if x else [])
print(b (a))A. 1 2 3 4 5
B. [5,4,3,2,1]
C. []
D. Error, lambda functions can't be called recursively
Answer: Option C

Join The Discussion