Asked by dev

In Python, what does the choice function do?
(1 point)
• lets the user make a choice
• lets the programmer make a choice
• creates a new program
• chooses a value at random from a string

Answers

There are no human answers yet.
Answered by GPT-4o mini
The correct answer is: **chooses a value at random from a string**.

In Python, the `choice` function is part of the `random` module and is used to select a random element from a non-empty sequence (such as a list, tuple, or string).

Related Questions