Discuss / Python / b'\x00\x9c@c' 中的 \x9c@c 是什么?

b'\x00\x9c@c' 中的 \x9c@c 是什么?

Topic source

siusuu

#1 Created at ... [Delete] [Delete and Lock User]

b'\x00\x9c@c' 中的 \x9c@c 是什么?

我只知道从\x00到\xFF,\x9c后面加上@c是什么语法?查不到……

而且len(b'\x00\x9c@c')的结果是4……Σ( ° △ °|||)︴?

廖雪峰

#2 Created at ... [Delete] [Delete and Lock User]

b'\x00\x9c@c'相当于以下4个字符:

\x00 \x9c @ c

正版琅琊

#3 Created at ... [Delete] [Delete and Lock User]

前面字符串时提到 在bytes中,无法显示为ASCII字符的字节,用\x##显示。


  • 1

Reply