Answers for "python choose random from generator"

1

how to make a function to choose random things in python

import random
def deal_card():
    cards = [11,2,3,4,5,6,7,8,10,10,10,10]
    card = random.choice(cards)
    return card
Posted by: Guest on August-26-2021
1

python select random number

import random
n = random.random()
print(n)
Posted by: Guest on June-01-2020

Code answers related to "python choose random from generator"

Python Answers by Framework

Browse Popular Code Answers by Language