What is the difference between u\'\' prefix and unicode()?
u\'\'
unicode()
# -*- coding: utf-8 -*- print u\'上午\' # this works print unicode(\'上午\'
Unicode is an object type whereas 'u' is a literal used to denote that object is unicode object. It is similar to 'L' literal used to denote long int.