MCQ Practice Single Best Answer Topic: Python Built-in Functions MCQ

Q What will be the output after the following statements?
import random
x = [3, 8, 6, 5, 0]
print(random.choice(x))

Question ID
#3946
Subchapter
Python Built-in Functions MCQ
Action
Choose one option below

Choose Your Answer

Click an option to check whether your answer is correct.

  • A A random element from the list x
  • B The list x
  • C A random element from the list x, excluding 3 and 0
  • D A random element from the list elements 3 and 0
Correct Answer: A

Explanation

A random element from the list x

Share This Question

Share this MCQ with your friends or study group.