Contact: aviboots(AT)netvision.net.il
40,959 questions
53,424 answers
573 users
from random import * the_numbers = [4, 6, 8, 9, 12, 44, 66, 89] a = sample(the_numbers, 1) print(a[0]) ''' run: 12 '''
import random lst = [4, 5, 7, 9, 12] n = random.choice(lst) print(n) ''' run: 12 '''
import random lst = ["aa", "bb", "rr", "tt", "ww"] n = random.choice(lst) print(n) ''' run: rr '''