Oct-16-2017, 03:56 AM
I have the following 'dictionary':
a = {"one":(10, 11.25), "two":(11, 12.25), "three":(12, 13.25)}
I would like to build an 'if statement' based on on the first value of each pair (i.e. in this example I'm comparing 10, 11, 12).
How would I go about doing so?
I've been playing around with the 'a.values()' function but that lists all the values. I would like to iterate through each value and verify they are positive.
Thanks!
a = {"one":(10, 11.25), "two":(11, 12.25), "three":(12, 13.25)}
I would like to build an 'if statement' based on on the first value of each pair (i.e. in this example I'm comparing 10, 11, 12).
How would I go about doing so?
I've been playing around with the 'a.values()' function but that lists all the values. I would like to iterate through each value and verify they are positive.
Thanks!