that many copies of the tuple in [ ]('foo''bar' out[ ]('foo''bar''foo''bar''foo''bar''foo''bar'note that the objects themselves are not copiedonly the references to them unpacking tuples if you try to assign to tuple-like expression of variablespython will attempt to unpack the value on the right-hand side of the equals signin [ ]tup ( in [ ]abc tup in [ ] out[ ] even sequences with nested tuples can be unpackedin [ ]tup ( in [ ]ab(cdtup in [ ] out[ ] using this functionality it' easy to swap variable namesa task which in many languages might look liketmp tmp ba ab one of the most common uses of variable unpacking when iterating over sequences of tuples or listsseq [( )( )( )for abc in seqpass another common use is for returning multiple values from function more on this later tuple methods since the size and contents of tuple cannot be modifiedit is very light on instance methods one particularly useful one (also available on listsis countwhich counts the number of occurrences of valuein [ ] ( data structures and sequences www it-ebooks info