Python 3: How to run functions with parameter in random order?
<p>I knew how to run functions which doesn't have parameter. In this case, I want to run functions which has parameter in random order ? </p>

<p>It showed the result but not random and there is some error: Please help me correct the my code. Thank you :)</p>

<pre><code>import random
def hi(name):
    print('a ' + name)

def howold(old, name):
    print( name + 'is ' + old + "years old")

def howmuch(money):
    print(money + ' dollars')


functions = [hi('John'),howold('20', 'John'),howmuch('50')]
random.shuffle(functions)
for i in functions:
    i()
</code></pre>

<p>Try something like that:</p>

<pre><code>functions = [(hi, ['John']), (howold, ['20', 'John']), (howmuch, ['50'])]

random.shuffle(functions)
for func, args in functions:
    func(*args)
</code></pre>

python function random