import random
import itertools
def test(number):
return random.random()*number
Say I have a function and I want to repeat it x times so that I may calculate the standard deviation. How can I do this? I've tried using itertools.repeat(test(5),3) but it prints repeat(value,3) which I can't calculate the standard deviation. I feel like I am missing something really simple....
Any thoughts?
Thanks a bunch!