# 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

True True
1
2
Error

Explanation :
No Explanation available for this question

# What will be the output of the following Python code m=reduce(lambda x: x-3 in range(4, 10)) print(list(m))

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

2.  No output

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

4.  Error

4

No output

Explanation :
No Explanation available for this question

# Which of the following numbers will not be a part of the output list of the following Python code def sf(a): return a%3!=0 and a%5!=0 m=filter(sf, range(1, 31)) print(list(m))

1.  1

2.  29

3.  6

4.  10

4

10

Explanation :
No Explanation available for this question

# The single line equivalent of the following Python code l=[1, 2, 3, 4, 5] def f1(x): return x

1.  filter(lambda x:x

2.  filter(lambda x, y: x

3.  filter(reduce x

4.  reduce(x: x

4

filter(lambda x:x<0, l)

Explanation :
No Explanation available for this question

# What will be the output of the following Python code list(map((lambda x:x^2), range(10)))

1.  [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]

2.  Error

3.  [2, 3, 0, 1, 6, 7, 4, 5, 10, 11]

4.  No output

4

[2, 3, 0, 1, 6, 7, 4, 5, 10, 11]

Explanation :
No Explanation available for this question

# What will be the output of the following Python code list(map((lambda x:x**2), filter((lambda x:x%2==0), range(10))))

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

2.  [0, 4, 16, 36, 64]

3.  Error

4.  No output

4

[0, 4, 16, 36, 64]

Explanation :
No Explanation available for this question

# The output of the following codes are the same. [x**2 for x in range(10)] list(map((lambda x:x**2), range(10)))

1.  True

2.  False

2

True

Explanation :
No Explanation available for this question

# What will be the output of the following Python code elements = [0, 1, 2] def incr(x): return x+1 print(list(map(elements, incr)))

1.  [1, 2, 3]

2.  [0, 1, 2]

3.  error

4.  none of the mentioned

4