Hello,
I want to create a function that takes a list of variables and prints one by one 'the value of X is xx' for example
something like
def printVars(listOfVariables,listOfVariablesNames):
for n,var in enumerate(listOfVariables):
print('the variable '+listOfVariablesNames[n]+' is equal to '+str(var))
U=1
n=3
T=2
printVars([U,n,T],['U','n','T'])
this exactly behavior but a function which will not have the second list so that I will call simply printVars([U,n,T])
sorry if i am not clear enought... not sure how to explain it better. I do this in bash/shell scripts without issues but not sure how to achieve this in python.