Does anyone know how to make it so that python prints how many times a function returns a value from a random.choice function?Here's the code:

import random turtles = ["1", "2", "3", "4"] cheese = random.choices(turtles, weights = (15, 0.5, 0.000000005, 84.499999995), k = 10000000)

I've tried everything, but I can't figure out how to make it work. HELP!

Do you mean if you run a function once, the value will be 1, but if you run it three times, the value will be three?

No, I mean that if I run the function 20 times, it returns how many times the output is 2, or how many times the output is 1.

I think I have it figured out though, I'll test it and then comment whether or not that worked here

It didn't work

Making all the decimals whole numbers didn't work

@THEGOLDENTHRONE Make a dictionary or ultimate variables and increase each value based on the result

## How do I do this???

Does anyone know how to make it so that python prints how many times a function returns a value from a random.choice function?

Here's the code:

I've tried everything, but I can't figure out how to make it work. HELP!

Do you mean if you run a function once, the value will be 1, but if you run it three times, the value will be three?

No, I mean that if I run the function 20 times, it returns how many times the output is 2, or how many times the output is 1.

I think I have it figured out though, I'll test it and then comment whether or not that worked here

It didn't work

Making all the decimals whole numbers didn't work

@THEGOLDENTHRONE Make a dictionary or ultimate variables and increase each value based on the result