 <p>Build a generator of scale/object tuples, and take the <code>max</code> of that. By putting the scale first, <code>max</code> keys off that correctly.</p> <pre><code>locators = ((getAttr(locator+'.localScaleY'), locator) for locator in pm.ls('locator*')) yMaxValue, locator = max(locators) </code></pre> <p>A few outputs for reference:</p> <pre><code>&gt;&gt;&gt; list(locators) # Result: [(1.0, nt.Transform(u'locator01')), (2.0, nt.Transform(u'locator02')), (3.0, nt.Transform(u'locator03')), (1.0, nt.Locator(u'locator0Shape1')), (2.0, nt.Locator(u'locator0Shape2')), (3.0, nt.Locator(u'locator0Shape3'))] # &gt;&gt;&gt; yMaxValue # Result: 3.0 # &gt;&gt;&gt; locator # Result: nt.Locator(u'locator0Shape3') # </code></pre>