随笔分类 -  python

摘要:1.split 将一个字符串拆分成一个子字符串列表,列表中的子字符串正好可以构成原字符串。 两个参数: 第一个参数表示使用哪个字符进行拆分。 第二个参数表示进行拆分的次数(两次拆分,可得3 个子字符串) #1、无参数 string1 = "My deliverable is due in May" 阅读全文
posted @ 2022-08-11 00:58 hiccup_lh 阅读(162) 评论(0) 推荐(0) 编辑
摘要:pip install 包名 -i http://pypi.doubanio.com/simple/ --trusted-host pypi.doubanio.com 阅读全文
posted @ 2022-08-02 22:54 hiccup_lh 阅读(87) 评论(0) 推荐(0) 编辑
摘要:1、使用psutil库计算实时上下传的网速 # coding:utf-8 import psutil import time def getNet(): sent_before = psutil.net_io_counters().bytes_sent # 已发送的流量 recv_before = 阅读全文
posted @ 2022-07-23 12:32 hiccup_lh 阅读(122) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示