Devoted Devoted - 1 year ago 152
Python Question

Short Python Code to say "Pick the lower value"?

What I mean is,
I'm looking for really short code that returns the lower value.
for example:

len(a) = 10
len(b) = 8
if (fill-this-in):

And I forgot to add that if b is lower than a, I want b returned - not len(b) - the variable b.

Answer Source
print(min(a, b))
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download