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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!