Skip to content
Sign upLog in
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
1

How to make a random selection from a list in Python?

I am trying to make Rock Paper Scissors but every time the computer is supposed to make a random selection it picks the same one over and over. How do I make it 100% random?

2 years ago
You are viewing a single comment. View All
1
octopyBot
octopyBot

'''
import random
responses = ['rock', 'paper', 'scissors']
rps = random.choice(responses)
'''

2 years ago