
Python
吟一句君埋泉下泥销骨
念念不忘,必有回响
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Python 进制转换
https://blog.youkuaiyun.com/u012063703/article/details/42609833原创 2021-05-17 17:42:27 · 450 阅读 · 0 评论 -
Python 定时任务
转自:奇猫 – 51CTO转载 2021-04-26 17:12:00 · 106 阅读 · 0 评论 -
Python 列表在内存中的顺序存储
列表在内存中的存储空间是连续的,因此在创建列表时,首先向操作系统申请一块固定大小的内存空间,来存储每个列表元素。例如 a = [1,2,3,4], 由于在 python 中, int 类型的数据占4个字节,因此这条语句会向操作系统申请 4*4 = 16 byte 的空间存储列表储存4 个元素。索引时根据列表第一个元素的内存地址加上列表所存储的数据类型所占的字节数*索引,假设第一个元素的内存地址为 0x001,a[1] 的内存地址就是 0x001 + 4*1= 0x005,a[3] 的内存地址就是 0x原创 2021-04-06 23:44:40 · 2268 阅读 · 2 评论 -
python timeit 测试单条语句或者函数执行时间
有时候需要比较两个语句的执行时间,例如 a_list = [i for i in range(100)] 和 a_list = list(range(100))不知道 timeit 之前我是这样写的:def test_one(number): for i in range(number): a_list = [i for i in range(100)]def test_two(number): for i in range(number): a_l原创 2021-04-06 23:00:36 · 466 阅读 · 0 评论 -
Python 之 os 模块基础使用
import osprint(os.name)print(os.environ)print(os.environb)print(os.getcwd())print(os.listdir('/'))print(os.path.abspath('../..'))os.system('ls')print(os.path.join('hi/', 'hello/'))print(os.path.dirname('/home/kaige/Downloads'))print(os.path.b原创 2021-03-04 18:31:30 · 176 阅读 · 1 评论 -
《Python 进阶》复盘笔记 - 小技巧
1, * 分割字符串_list = ['name', 'age', '2020', '10', '10']name, age, *years = _listprint(name)print(age)print(years)# output:# name# age# ['2020', '10', '10']2, *,** 函数传参args = ['csdn', 100, 'https://www.youkuaiyun.com/']kwargs = { 'name': 'csdn',原创 2021-02-07 17:14:48 · 260 阅读 · 0 评论 -
Python 序列操作
不可变数据类型数字字符串元组range 类型bytes 类型可变数据类型列表字典集合原创 2020-12-09 00:41:03 · 266 阅读 · 0 评论 -
IT 好文推荐
个人收集的精品 IT 资源、文章,包含计算机网络、Python、数据库、算法等多个方面,持续更新中…如果有更好的资源推荐,欢迎在评论区留言计算机网络标题作者网络类型PAN、LAN、WLAN、CAN、MAN、WAN简单介绍itmacy计算机网络的概念、组成、功能和分类BitHachi计算机网络基础知识总结来了!!!南宫旭尧IP 基础知识全家桶,45 张图一套带走小林coding常见面试题整理–计算机网络篇(每位开发者必备路人甲TCP/IP 基原创 2020-11-27 03:33:28 · 833 阅读 · 0 评论 -
Python time 模块,一文搞定!!!
Python time 模块详解Python 版本: 3.8系统:Ubuntu 20.04时间的标准表示形式首先我们可以看看time模块的内置文档import timeprint(time.__doc__)# This module provides various functions to manipulate time values.# There are two standard representations of time. One is the number# of s原创 2020-11-30 15:35:58 · 287 阅读 · 0 评论