var_names = ['one', 'two', 'three']
count = 1
for name in var_names:
    globals()[name] = count
count += 1
one
two
three
globals()[input()] = 42
answer
Assigning values to variables in a list using a loop