![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
岚不见绘转
博主是个sb,请不要深究1
展开
-
字节、字符、编码
字节In [1]: bytes??Init signature: bytes(self, /, *args, **kwargs)Docstring:bytes(iterable_of_ints) -> bytesbytes(string, encoding[, errors]) -> bytesbytes(bytes_or_buffer) -> immutable copy of bytes_or_bufferbytes(int) -> bytes object of原创 2021-02-18 19:22:53 · 139 阅读 · 0 评论 -
Python2.7:sorted 与 sort 的使用及区别
#!/usr/bin/env python# -*- coding: utf-8 -*-############################################################# sorted 与 sort 区别## sorted():用于任意的可迭代对象,例如字符串,元组,列表,字典等。# sorted(iterable, cmp=None, key=No原创 2017-10-11 10:46:16 · 437 阅读 · 0 评论 -
Python:logging模块
简单示例#!/usr/bin/env python# -*- coding: utf-8 -*-import logging# 日志级别(低到高): DEBUG 《 INFO 《 WARNING 《 ERROR 《 CRITICAL# 如:logging.DEBUG## basicConfig()函数:# 1)传入logging.DEBUG作为level关键字参数,这将显示所有日转载 2017-10-11 11:57:40 · 287 阅读 · 0 评论 -
re模块:findall()
findall():查询字符串中某个正则表达式模式全部的非重复出现情况。原创 2017-11-08 10:56:42 · 497 阅读 · 0 评论