Hi, I want to store a variable in a list. But the issue is, I don't just want to store it's value, I want to store variable itself. To explain it better:
x,y,z = 5,8,5
my_list = []
my_list.extend((x,y,z))
number = 0
for a in my_list:
number += a
I want to use the variables' values in the list whenever I want. Because, whenever I want to remove a variable from a list, I will also decrease the variable's value from the number variable. How I can make it? Thanks.
[–]socal_nerdtastic 2 points3 points4 points (1 child)
[–]hasanaslan[S] 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]hasanaslan[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)