So i just want to print the variable's name. you can see from the case below
Andi = 100
Bill = 50
Kira = 90
List1 = [Andi, Bill, Kira]
for i in List1:
print(i) # Here the problem, i want the Variable Name and Value printed together
How to return it together? I respect all answer. Thank You :)
So guys i got this code from user, name "Anna Nevison". i wanted to accept her answer, but she delete her post so i post her code here :)
Andi = 100
Bill = 50
Kira = 90
List1 = ['Andi', 'Bill', 'Kira']
for i in List1:
print(i, eval(i))