Think Python: How to Think Like a Computer Scientist

(singke) #1



hist
{'a': 2, 'b': 1}





your function should return 'a' with probability 2/3 and 'b' with probability 1/3.

Free download pdf