$ python3
Python 3.3.3 (default, Nov 26 2013, 13:33:18)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> a = ['M\xc3\xa3e']
>>> print(a)
['Mãe']
>>>
or in python2 you can:
print '[' + ','.join("'" + str(x) + "'" for x in a) + ']'
In python2 you can subclass
list
class and use__unicode__
method:For personal use, this module https://github.com/moskytw/uniout will come very handy.
This is a feature in python2
But in python3 you will get what you want :).
or in python2 you can: