当前位置: 动力学知识库 > 问答 > 编程问答 >

python - Differences in binary values of an ascii char

问题描述:

Lets take 'G' as an example, the letter 'G' is in the place #72.

using Python and the built-in method ord('G') I got 71.

Why the difference?

网友答案:

the letter 'G' is in the place #72.

Your assumption is wrong. From your table, G is places at 0x47 = 71 = ord('G')

The way to read your table is to, find the column number (#Col) and the row number(#Row) of the character you are searching, then the character code, in hex is 0x#Col#Row

分享给朋友:
您可能感兴趣的文章:
随机阅读: