Single Choice Difficult

QWhich of the following methods of 'random' module is used to pick a single element, randomly, from a given list of elements?

ID: #20261 Create Objects in Python 109 views
Question Info
#20261Q ID
DifficultDifficulty
Create Objects in PythonTopic

Choose the Best Option

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

  • A choice
  • B choose
  • C pick
  • D sample
Correct Answer

Explanation

The correct method to pick a single element randomly from a given list of elements using the random module is:


random.choice()

So, the correct answer is: choice

Share This Question

Challenge a friend or share with your study group.