官术网_书友最值得收藏!

  • Learn Python in 7 Days
  • Mohit Bhaskar N. Das
  • 90字
  • 2021-07-09 20:40:24

Conversion functions

In order to convert a character value to ASCII code, the ord() function is used, and for converting ASCII code to character, the chr() function is used, as shown in the following screenshot:

Here, when we want to get the ASCII code for 'A', it shows 65, which you can easily get from the aforementioned table. The letter 'A' can be located on the sixth row and fifth column; thus, its value is 65. Likewise, we can get the letter corresponding to a particular ASCII code.

主站蜘蛛池模板: 社会| 中宁县| 普安县| 祁门县| 新源县| 江阴市| 平塘县| 南涧| 安平县| 宁都县| 新干县| 蓝田县| 应用必备| 宁明县| 岐山县| 淮北市| 施秉县| 静安区| 什邡市| 尖扎县| 利辛县| 红桥区| 宁陵县| 芦山县| 无为县| 平武县| 景泰县| 永登县| 元阳县| 永顺县| 益阳市| 天全县| 镶黄旗| 汉源县| 额济纳旗| 开化县| 乌恰县| 来凤县| 左云县| 麻城市| 多伦县|