[Solved] Randomly pick numbers from one function to another [closed]


I think you are going overkill on this and over complicating your task. First pass your list to test1, then you pass that result into test2 and take 2 choice‘s from that value and return them, both functions only need to receive one argument

from random import choice

def test1(x):
    return x 

def test2(x):
    a = choice(x)
    b = choice(x)
    return a, b

print(test2(test1([1, 5, 7, 8, 12])))

2

solved Randomly pick numbers from one function to another [closed]