What does ‘u’ mean in a list?

it’s an indication of unicode string. similar to r'' for raw string.

>>> type(u'abc')
<type 'unicode'>
>>> r'ab\c'
'ab\\c'

Leave a Comment