ProgrammingHardTCS NQT · Wipro pattern

What is printed?

What is printed?
print(list(map(pow, [2, 3], [3, 2])))
  1. A. [8, 9]
  2. B. [6, 6]
  3. C. [8, 6]
  4. D. [9, 8]

Correct answer: A. [8, 9]

pow is applied pairwise to the two lists, giving 2 to the power 3 and 3 to the power 2.

More Python Programming questions

Exams that ask this topic