Single Choice Not Set

QThe output of the expression {0 if i%2 ==0 else 1 for i in range(8)} is _______.

ID: #3641 Python Functions MCQ 466 views
Question Info
#3641Q ID
Not SetDifficulty
Python Functions MCQTopic

Choose the Best Option

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

  • A {0, 1, 0, 1, 0, 1, 0, 1}
  • B {0, 1}
  • C [0,1]
  • D [0, 1, 0, 1, 0, 1, 0, 1]
Correct Answer

Explanation

{0, 1}

Share This Question

Challenge a friend or share with your study group.