Question: Random choice in Python? I have the following script and need to use a for loop to print out a random choice from the list
Random choice in Python?
I have the following script and need to use a for loop to print out a random choice from the list 20 times. I know the current one I have now only prints out a singular random choice.
import random
daysofweek = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
print(random.choice(daysofweek))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
