I have a list
test=['num1' ,'num2']
and variables
valuenum1 = 'x'
valuenum2 = 'y'
I want to do the following loop
for i in test:
print(value{i})
Which I cant do because value is not a string, so the {i} method is useless. Is there a way to do loop the value in test
so I can print valuenum1
and valuenum2
?