Painting Blue Code
Simple, self-explanatory code snippets.
2015-07-15
PYTHON - Randomly choose an list/array element (numeric or text)
import random
print( random.choice( [1,2,3] ) )
print( random.choice( ['a','b','c'] ) )
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment