# 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))

1.  1 2 3 4 5

2.  [5,4,3,2,1]

3.  []

4.  Error, lambda functions can’t be called recursively

4

[]

Explanation :
No Explanation available for this question

# What will be the output of the following Python code odd=lambda x: bool(x%2) numbers=[n for n in range(10)] print(numbers) n=list() for i in numbers: if odd(i): continue else: break

1.  [0, 2, 4, 6, 8, 10]

2.  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

3.  [1, 3, 5, 7, 9]

4.  Error

4

[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

Explanation :
No Explanation available for this question

# What will be the output of the following Python code f=lambda x:bool(x%2) print(f(20), f(21))

1.  False True

2.  False False

3.  True True

4.  True False

4

False True

Explanation :
No Explanation available for this question

# What will be the output of the following Python code import functools l=[1,2,3,4] print(functools.reduce(lambda x,y:x*y,l))

1.  Error

2.  10

3.  24

4.  No output

4

24

Explanation :
No Explanation available for this question

# What will be the output of the following Python code l=[1, -2, -3, 4, 5] def f1(x): return x

1.  [1, 4, 5 ]

2.  Error

3.  [-2, -3]

4.  [1, -2, -3]

4

[1, -2, -3]

Explanation :
No Explanation available for this question

# What will be the output of the following Python code l=[-2, 4] m=map(lambda x:x*2, l) print(m)

1.  [-4, 16]

3.  Error

4.  -416

4

Explanation :
No Explanation available for this question

# What will be the output of the following Python code l=[1, -2, -3, 4, 5] def f1(x): return x

1.  [False, False, False, False, False]

2.  [False, True, True, False, False]

3.  [True, False, False, True, True]

4.  [True, True, True, True, True]

4

[False, True, True, False, False]

Explanation :
No Explanation available for this question

# What will be the output of the following Python code l=[1, 2, 3, 4, 5] m=map(lambda x:2**x, l) print(list(m))

1.  [1, 4, 9, 16, 25 ]

2.  [2, 4, 8, 16, 32 ]

3.  [1, 0, 1, 0, 1]

4.  Error

4

[2, 4, 8, 16, 32 ]

Explanation :
No Explanation available for this question

# What will be the output of the following Python code import functools l=[1, 2, 3, 4, 5] m=functools.reduce(lambda x, y:x if x>y else y, l) print(m)

1.  Error

3.  1

4.  5

4

5

Explanation :
No Explanation available for this question

# What will be the output of the following Python code l=[n for n in range(5)] f=lambda x:bool(x%2) print(f(3), f(1)) for i in range(len(l)): if f(l[i]): del l[i] print(i)

1.  True True12Error

2.  False False12

3.  True False 12Error

4.  False True12

4