On Sat, Apr 18, 2015 at 5:56 PM, Ahamed Farook <farookr...@gmail.com> wrote:
> sorted(lsNearCities, key=operator.itemgetter(1,0))

This doesn't sort the list, it constructs a new one - and then
promptly discards it. What you want is the .sort() method on the list
object. As your code is incomplete, I can't say if there are any other
issues in it, but try switching over to the sort method and seeing if
that does what you want.

All the best!

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to