Contact: aviboots(AT)netvision.net.il
39,926 questions
51,859 answers
573 users
import random def getItem(lst): return random.choice(lst) lst = ['python', 'java', 'php', 'swift', 'c++', 'c', 'c#'] print(getItem(lst)) ''' run: c '''
import secrets def getItem(lst): return secrets.choice(lst) lst = ['python', 'java', 'php', 'swift', 'c++', 'c', 'c#'] print(getItem(lst)) ''' run: java '''
import numpy def getItem(lst): return numpy.random.choice(lst) lst = ['python', 'java', 'php', 'swift', 'c++', 'c', 'c#'] print(getItem(lst)) ''' run: c '''