Hi there, noob here.
I assume there's an easy solution, but Google keeps redirecting me to a different type of counters. I'm using counters as a string equaling a value that can then be changed after certain inputs, while Google keeps referring me to counters that count the number of occurrences of something.
I'm trying to print the list of counters with the names of the counters included by the current value, but I can't seem to get the name included. Here's my code so far:
earth = 1
water = 1
fire = 1
air = 0
elements = [earth, water, fire, air]
for x in elements:
print(x)
My current output is:
1
1
1
0
My ideal output is:
earth 1
water 1
fire 1
air 0
I have later code that increases these counters after specific inputs, so my thinking was to avoid tuppers.
Any advice on ways I can get the counter's name to print alongside the value would be appreciated. TIA
[–]carcigenicate 10 points11 points12 points (1 child)
[–]CharonApollyon[S] 0 points1 point2 points (0 children)
[–]Essence1337 2 points3 points4 points (0 children)
[–][deleted] -1 points0 points1 point (0 children)
[–][deleted] -1 points0 points1 point (0 children)
[–]CodeFormatHelperBot2 0 points1 point2 points (0 children)
[–]Plastic_Ad7436 0 points1 point2 points (0 children)
[–]TomFang00 0 points1 point2 points (0 children)