
if random:
    numbers = 1
    print_numbers(numbers)
else:
    numbers = 1, 2, 3
    print_numbers(numbers)

def print_numbers(numbers):
    for n in numbers:
        print(n)




def print_numbers(numbers):
    for n in numbers:
        print(n)

if random:
    numbers = 1
    print_numbers(numbers)
else:
    numbers = 1, 2, 3
    print_numbers(numbers)



Make function exist when called.