DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python how to randomly choose an item from a list
import random nums = ['a', 'b', 'c', 'd', 'e'] print(random.choice(nums))
PREVIOUS
NEXT
Tagged:
#python
#randomly
#choose
#item
#list
ADD COMMENT
Topic
COMMENT
Name
6+4 =
Submit