Obtain the random choice once only
import random numberList = [2, 4, 6, 8, 10] random_num = random.choice(numberList) print(f'random.choice = {random_num}') print('hello world') print('tnx yoriz') print(('the random choice number ' f'(here i want python to print me the {random_num} again)'))
Output:random.choice = 4
hello world
tnx yoriz
the random choice number (here i want python to print me the 4 again)