
找工作
*小呆
程序...跳了舞
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
defaultdict: 强大的dict 子类
整理于 官方网站初始化from collections import defaultdictkey 和 valuekey 是不可变类型value 可以是可变类型,比如 list, set, 当然也可以是不可变类型 int, str举个栗子s = [('yellow', 1), ('blue', 4), ('yellow', 3), ('blue', 2), ('red', 1)]dic = defaultdict(list)for k, v in s: dic[k].ap.原创 2021-08-15 16:12:15 · 180 阅读 · 0 评论 -
csdn 打印pdf
f12 的 控制台输入(function(){ 'use strict'; var articleBox = $("div.article_content"); articleBox.removeAttr("style"); $("#btn-readmore").parent().remove(); $("#side").remove(); $("#comment_title, #comment_list, #comment_bar, #comment_fo原创 2021-07-13 15:13:49 · 277 阅读 · 1 评论 -
python 刷题实用技巧
binbin函数可以返回一个数字的二进制字符串,如下,其中0b表示二进制。In [4]: bin(3^6)Out[4]: '0b101'count返回具有指定值的元素个数。In [4]: bin(3^6)Out[4]: '0b101'In [5]: bin(3^6).count("1")Out[5]: 2原创 2021-01-31 10:30:44 · 592 阅读 · 0 评论