options = { 'A': 0.5, 'B': 0.3, 'C': 0.2 } result = random.choices(list(options.keys()), options.values())[0]. ❤️ Is this article helpful?
確定! 回上一頁