Program - random choice


Topic: Program - random choice

Solution

from random import choice
a, b, c = float, int, str
for i in range(5):
    j = choice([a,b,c])(i)
    print(j, type(j))



List all Python Programs