Yeah the list seems flaky at the moment. Additionally, my query is an
incredibly stupid one. But what you have works and represents an
improvement over the unreadable kludge I was doing. Thanks to all who
responded.
cheers,
k
On Sep 6, 2009, at 12:26 AM, Douglas Philips wrote:
On or about 2009 Sep 5, at 10:45 AM, Martin A. Brown indited:
I must have missed a message or two, because I don't understand why
math is being done on constants like that.
Given my misunderstanding, I'd go with:
my_map = { 38: 34, 40: 39 }
def filter_item(item):
return my_map.get(item, item)
l = [ ... ]
l = map(filter_item, l)
-Doug
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor