英文文档:

ord(c)
Given a string representing one Unicode character, return an integer representing the Unicode code point of that character. For example, ord('a') returns the integer 97 and ord('€') (Euro sign) returns 8364. This is the inverse of chr().

  返回 unicode 字符对应的整数

说明:
  1. 函数功能传入一个Unicode 字符,返回其对应的整数数值。
>>> ord('a')
97
>>> ord('@')
64

  2. 其功能和chr函数刚好相反。

>>> chr(97)
'a'
>>> chr(64)
'@'

Python内置函数(16)——ord的更多相关文章

  1. Python内置函数(48)——ord

    英文文档: ord(c) Given a string representing one Unicode character, return an integer representing the U ...

  2. Python内置函数(16)——dir

    英文文档: dir([object]) Without arguments, return the list of names in the current local scope. With an ...

  3. 16.python内置函数

    Python 内置函数:https://www.runoob.com/python/python-built-in-functions.html 原文:https://www.cnblogs.com/ ...

  4. python内置函数

    python内置函数 官方文档:点击 在这里我只列举一些常见的内置函数用法 1.abs()[求数字的绝对值] >>> abs(-13) 13 2.all() 判断所有集合元素都为真的 ...

  5. python 内置函数和函数装饰器

    python内置函数 1.数学相关 abs(x) 取x绝对值 divmode(x,y) 取x除以y的商和余数,常用做分页,返回商和余数组成一个元组 pow(x,y[,z]) 取x的y次方 ,等同于x ...

  6. Python内置函数进制转换的用法

    使用Python内置函数:bin().oct().int().hex()可实现进制转换. 先看Python官方文档中对这几个内置函数的描述: bin(x)Convert an integer numb ...

  7. 【转】python 内置函数总结(大部分)

    [转]python 内置函数总结(大部分) python 内置函数大讲堂 python全栈开发,内置函数 1. 内置函数 python的内置函数截止到python版本3.6.2,现在python一共为 ...

  8. python内置函数,匿名函数

    一.匿名函数 匿名函数:为了解决那些功能很简单的需求而设计的一句话函数 def calc(n): return n**n print(calc(10)) #换成匿名函数 calc = lambda n ...

  9. python 内置函数总结(大部分)

    python 内置函数大讲堂 python全栈开发,内置函数 1. 内置函数 python的内置函数截止到python版本3.6.2,现在python一共为我们提供了68个内置函数.它们就是pytho ...

随机推荐

  1. tensorflow第一篇---numpy模块

    写在前面: 自学tensorflow半个月,博友们给了我很多帮助,这是我第一篇原创的博文,我想把之前的知识梳理一遍,我会分享我一些在学习过程中遇到的问题,我目前只有这些......... 在介绍ten ...

  2. 进程互斥 Peterson算法

    转自http://blog.csdn.net/l294265421/article/details/46674847 假设有两个进程需要互斥的访问某一个临界区. Peterson算法的形式如下: en ...

  3. javaweb 关于页面获取数据

    EL(Excepress Language表达式语言) 1.....所有的EL都是以$"{"开始,以"}"结尾的.例:${sessionScope.user.s ...

  4. 为什么覆写equals必须要覆写hashCode?

    ============================================= 原文链接: 为什么覆写equals必须要覆写hashCode? 转载请注明出处! ============= ...

  5. jq事件

    1,ready:当DOM载入就绪可以查询及操纵时绑定一个要执行的函数,在使用之前必须确保body元素的onload事件,,没有注册函数,否则不会触发ready函数. $(document).ready ...

  6. day6 bytes类型用法

    1 python2与3的区别 一编码方式:  python2是由ascii编码组成    python3是由unicode编码的 二字符串输出   python2中字符串不添加括号也可以打印    p ...

  7. python实现一般最小二乘系统辨识方法

    问题: 对于一个未知参数的系统,往往需要用到系统辨识的方法,例如对于一个单输入单输出系统: Z(k)+a1*Z(k-1)+a2*Z(k-2)=b1*U(k-1)+b2*U(k-2)+V(k) 其中:V ...

  8. Spring依赖注入 — util命名空间配置

    要使用<util>标签,必须在XML中加入util名称空间(namespace): xmlns:util="http://http://www.springframework.o ...

  9. IPFS和竞争对手们(二)

    在上一篇<IPFS和竞争对手们(一)>的开头抱怨的IPFS的开发进度,今天才得知 MaidSafe 是从2006年起步的( )这进度也是醉了. 接上一篇,今天继续讲IPFS的竞争对手们 图 ...

  10. 1-2 Spring 的基本使用

    1.Spring容器的配置文件applicationContext.xml的引入 名称可以自己定义 <?xml version="1.0" encoding="UT ...