Python Programming - Standard Libraries - Discussion

Discussion Forum : Standard Libraries - General Questions (Q.No. 4)
4.
What does the random.choice() function do?
Generates a random integer
Picks a random element from a sequence
Sorts a list in random order
Returns a random floating-point number
Answer: Option
Explanation:
The random.choice() function in Python is used to pick a random element from a sequence, such as a list or tuple.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.