Q. Which of the following is the same as list(map(lambda x: x**-1, [1, 2, 3]))?

  • (A) [x**-1 for x in [(1, 2, 3)]]
  • (B) [1/x for x in [(1, 2, 3)]]
  • (C) [1/x for x in (1, 2, 3)]
  • (D) error
πŸ’¬ Discuss
βœ… Correct Answer: (C) [1/x for x in (1, 2, 3)]
Explanation: x**-1 is evaluated as (x)**(-1).

Explanation by: Mr. Dubey
x**-1 is evaluated as (x)**(-1).

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
854
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
95%
Success Rate