Programming Language Python List MCQ Question #3876
Single Choice Not Set

QWhat will be the output after the following statements?
a = [-3, -1, 0, 1, 3]
print([abs(x) for x in a])

ID: #3876 Python List MCQ 226 views
Question Info
#3876Q ID
Not SetDifficulty
Python List MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A [-3, -1, 0, 1, 3]
  • B [0, 1, 3]
  • C [3, 1, 0, 1, 3]
  • D [-1, 0, 1]
Correct Answer

Explanation

[3, 1, 0, 1, 3]

Share This Question

Challenge a friend or share with your study group.