Closed rzschech closed 6 years ago
I often want to pick one from a collection of values. Can we have a method similar to http://chancejs.com/#pickone
For example:
def pickone(list): return list[random.randint(1, len(list) - 1)]
Thanks
Thanks for suggestion! Added pickone method and uploaded new release to PyPi.
Nice one, thanks :-)
I often want to pick one from a collection of values. Can we have a method similar to http://chancejs.com/#pickone
For example:
Thanks