I have to write one string as follows:
A = 55
B = 45
res = 'A =' + str(A) + '\n' + \
'B = ' + str(B)
The A and B have to be separated into two lines.
print res
Result is correct. However, if i have other variables such as C,D,E, etc. doing one by one as in my code is difficult. What is shorter and easier way for doing it?
locals()?