Ah, Alan sent an answer also, but this one answers the last tidbit. Alan had the some_list and pair the same name, presumably creating a temporary tuple and when the loop is done, the temporary replaces the original.
Thanks Clayton !-----Original Message----- !From: Danny Yoo [mailto:d...@hashcollision.org] !Sent: Tuesday, October 28, 2014 4:23 PM !To: Clayton Kirkwood !Cc: Python Tutor Mailing List !Subject: Re: [Tutor] Would somebody kindly... ! !On Tue, Oct 28, 2014 at 4:13 PM, Clayton Kirkwood <c...@godblessthe.us> !wrote: !> Explain this double speak(>: !> !> [pair for pair in values if key == pair[0]] ! !Hi Clayton, ! !Here is a rewording of that expression to an approximately equivalent !statement: ! !####################### !some_list = [] !for pair in values: ! if key == pair[0]: ! some_list.append(pair) !####################### _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor