MCQ Single Best Answer Not Set

QWhat will be the output after the following statements?
 from random import *
x = [0, 2, 4, 6, 8, 10]
print(sample(x, 3))

ID: #3560 Python Module MCQ 258 views
Question Info
#3560Q ID
Not SetDifficulty
Python Module MCQTopic

Choose the Best Option

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

  • A A dictionary containing 3 random keys from list x
  • B Three random integer values between 0 and 10
  • C A list containing 3 random elements from list x
  • D A tuple containing 2 random elements from list x
Correct Answer: Option C

Explanation

A list containing 3 random elements from list x

Share This Question

Challenge a friend or share with your study group.