What is the difference between u' ' prefix and unicode() in python?

后端 未结 4 1772
慢半拍i
慢半拍i 2020-12-16 02:35

What is the difference between u\'\' prefix and unicode()?

# -*- coding: utf-8 -*-
print u\'上午\'  # this works
print unicode(\'上午\'         


        
4条回答
提交回复
热议问题