Recently tried something similar to PHP to get the largest number of 3 variables
(Of course, in Python form) However, when I return the value, I get the value of the variable, not the name of the variable.
My array looks like this:
x = 1
y = 2
z = 3
alloutputs = [x, y, z]
The farthest and ugliest before you need help:
alloutputs[alloutputs.index(max(alloutputs))]
However, it still gives me an integer value of the highest value! How can I return the name x, y or z depending on which is the largest?
source
share