<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">Ciao.</div><div class="">Il metodo é giusto ma vuole ricevere una lista come parametro.</div><div class=""><br class=""></div>random.choices(list(cesto.keys()), weights=list(cesto.values()))<div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 30 Sep 2022, at 14:59, Gabriele Battaglia <<a href="mailto:iz4apu@libero.it" class="">iz4apu@libero.it</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">random.choices(cesto.keys(), weights(cesto.values())</span></div></blockquote></div><br class=""></div></body></html>