开发者

python: what does u'{' represent?

When I print out a value it has a u开发者_Go百科 in front of it, I think it is some type notation, what is it? Where I can find a list of such notations?


It meant UNICODE string literal before Python 3.

Documentation about all these literal adornments can be found there.


Unicode Constructors talks about unicode.


That's creating a unicode string. I'd recommend this section from Dive into Python on the topic

There are many advantages to explicitly using unicode, the most common reason for doing so is to force integrity when working with a database.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜