Re: random choice from dictionary

2018-12-23 Thread sarah123ed
Maybe something like this: import random k = list(data.keys()) random.shuffle(k) result = data[k[0]] -- https://mail.python.org/mailman/listinfo/python-list

Re: random choice from dictionary

2018-12-23 Thread sarah123ed
Maybe something like this? import random k = list(data.keys()) random.shuffle(k) selected = f[k[0]] -- https://mail.python.org/mailman/listinfo/python-list