nested tuple slice

2005-04-12 Thread dimitri pater
hello! I want to change a nested tuple like: tuple = (('goat', 90, 100), ('cat', 80, 80), ('platypus', 60, 800)) into: tuple = (('goat', 90), ('cat', 80), ('platypus', 60)) in other words, slice the first elements of every index Any ideas on how to do this in an elegant, pythonic way? Best

RE: nested tuple slice

2005-04-12 Thread Leeds, Mark
, April 12, 2005 5:49 PM To: python-list@python.org Subject: nested tuple slice hello! I want to change a nested tuple like: tuple = (('goat', 90, 100), ('cat', 80, 80), ('platypus', 60, 800)) into: tuple = (('goat', 90), ('cat', 80), ('platypus', 60)) in other words, slice the first elements

Re: nested tuple slice

2005-04-12 Thread dimitri pater
Message- From: python-list-bounces+mleeds=[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of dimitri pater Sent: Tuesday, April 12, 2005 5:49 PM To: python-list@python.org Subject: nested tuple slice hello! I want to change a nested tuple like: tuple = (('goat', 90, 100), ('cat', 80

Re: nested tuple slice

2005-04-12 Thread Brian van den Broek
dimitri pater said unto the world upon 2005-04-12 17:49: hello! I want to change a nested tuple like: tuple = (('goat', 90, 100), ('cat', 80, 80), ('platypus', 60, 800)) into: tuple = (('goat', 90), ('cat', 80), ('platypus', 60)) in other words, slice the first elements of every index Any ideas on