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