Reference:

  1. Python 3.1 快速導覽 - 內建函數 ord()


ord(c): 回傳字元 c 的 Unicode 編碼值

想要在python裡表達binary value為10進制可以透過下面的方式:

print int(ord('d'))
#OUT: 100

results matching ""

    No results matching ""