On Sat, Mar 19, 2016 at 12:27 PM, Martin A. Brown <mar...@linux-ip.net> wrote: > But, I still don't understand why this works and can't puzzle it > out. I see a sequence on the left of the assignment operator and a > dictionary (mapping) on the right.
When you iterate over a dictionary, you get its keys: scores = {"Fred": 10, "Joe": 5, "Sam": 8} for person in scores: print(person) So unpacking will give you those keys - in an arbitrary order. Of course, you don't care about the order when there's only one. ChrisA -- https://mail.python.org/mailman/listinfo/python-list