def one():
while True:
print()
if():
def two():
while True:
print()
if():
If it's like this, I wonder how to make the entire def one()
and def two()
randomly output both!!
The function can be executed randomly, as shown below.
def one():
print('1')
def two():
print('2')
import random
func_list = [one, two]
random.choice(func_list)()
© 2024 OneMinuteCode. All rights reserved.