"Frank Millman" <fr...@chagford.com> writes: > Hi all > > This should be easy, but I cannot figure it out. > > Assume you have a tuple of tuples - > > a = ((1, 2), (3, 4)) > > You want to add a new tuple to it, so that it becomes - > > ((1, 2), (3, 4), (5, 6)) > > The obvious way does not work - > > a += (5, 6) > > ((1, 2), (3, 4), 5, 6)
You could use: a += (5, 6), or (more clearly written): a += ((5, 6),) -- https://mail.python.org/mailman/listinfo/python-list