Reputation: 71
I have figured out how to sort list which return a tuple with false. This key works when language is in English but won't work when translated to Japanese.
key=lambda x:(x.name!='Iraq', x.name)
This one won't work.
key=lambda x:(x.name!='イラク', x.name)
Any idea about this?
Upvotes: 1
Views: 57
Reputation: 53535
Add at the top of the file the following lines in order to support utf8:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
Upvotes: 5