Paul Rubin wrote:
median = x.sorted()[len(x)//2]

In Python 2.4:

>>> [10, 8, 6, 4, 2, 1].sorted()
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
AttributeError: 'list' object has no attribute 'sorted'

Perhaps you meant "sorted(x)"?

Steve
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to