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

  • 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.

主站蜘蛛池模板: 兰考县| 昭觉县| 喀什市| 临沭县| 台中县| 德令哈市| 盐山县| 江源县| 阳城县| 深泽县| 高陵县| 荃湾区| 青铜峡市| 皋兰县| 九江市| 双峰县| 宜良县| 阿拉善右旗| 凯里市| 龙南县| 蓬莱市| 广饶县| 乐陵市| 上栗县| 疏勒县| 景谷| 雅安市| 山东| 衡水市| 石家庄市| 晋中市| 岫岩| 湟中县| 乌拉特前旗| 会宁县| 临泉县| 江口县| 大同县| 诏安县| 木里| 广南县|