I'm having trouble aligning strings when using .format()
, for example when doing:
>>> print '{:>6}'.format('agua'}
agua
>>> print '{:>6}'.format('água'}
água
Note that the first format comes out as expected, 2 spaces + 4 characters = 6. In the second this does not happen, there is 1 space + 4 characters, since the size of this string unicode is larger than which we visually see
>>> len('agua')
4
>>> len('água')
5
This is 'breaking' the whole alignment of my output, is there any way to fix this?