a = "i love love you you" from collections import Counter dict( Counter(list(a.split())) ) Out[103]: {'i': 1, 'love': 2, 'you': 2} 或者: s = '11AAAdfdfB ...
分类:
其他好文 时间:
2020-02-26 22:44:56
阅读次数:
76
参考: 左程云进阶算法第8节视频内容(2小时18分钟处) 视频百度网盘:链接:https://pan.baidu.com/s/1beVfli8bmH9obwNW3NT3Kg 提取码:q5bi loveforever个人博客网站:https://zhenganwen.top/posts/310d483 ...
分类:
编程语言 时间:
2020-02-25 09:51:51
阅读次数:
73
The 12th Doctor’s last words: “Oh there it is. Silly old universe. The more I save it, the more it needs saving. It’s a treadmill. “Yes, Yes I know th ...
分类:
其他好文 时间:
2020-02-21 18:15:37
阅读次数:
91
import os # 创建的目录 path = "D:/gaona/liuhai/i love you" os.makedirs( path ) ...
分类:
其他好文 时间:
2020-02-20 20:36:08
阅读次数:
66
1. Bertrand Triangle r=1; %circle radius x0=0; y0=0; %centre of circle %points for circle t=linspace(0,2*pi,200); xp=r*cos(t); yp=r*sin(t); %angles of ...
分类:
其他好文 时间:
2020-02-20 10:21:47
阅读次数:
67
Memorize: 1.People are always talking about 'Problem of Youth.' 2.If there is one--which I take leave to doubt--then it is the elder peole who creat i ...
分类:
其他好文 时间:
2020-02-19 13:06:48
阅读次数:
93
经常用于提示框,下拉菜单等(csdn也很多用到,最后一图),看图: 由于在网页中经常要用到,所以特地研究 图片实现(感觉low)、svg实现(小题大作了),所以最后还是css画比较不错,兼容性也不错 三角形画法 html结构 <div class="triangle" </div 三角形画法 用bo ...
分类:
Web程序 时间:
2020-02-18 18:10:40
阅读次数:
96
题目:https://atcoder.jp/contests/abc155/tasks/abc155_c 这道题的题意是给我们n个string,让我们统计每个string出现的次数,并输出次数最多的一个或多个string(按字典序来排列) 当时我想的是用数组来统计每个string,之后再sort一次 ...
分类:
编程语言 时间:
2020-02-17 01:06:22
阅读次数:
79
这几天在b站看小甲鱼的python3教程,照着写了个有道翻译的程序 代码中字典data中的内容,用浏览器审查元素,先随便输一个要翻译的,找到跳出来的post的那个网址,看formdata就行了 返回的是json格式的,故需解码 代码如下 1 #!/usr/bin/env python 2 # -*- ...
分类:
编程语言 时间:
2020-02-16 22:15:15
阅读次数:
133
rowIndex=0 -> len = 1 所以 例如 rowIndex=3 1.初始化 res=[0,0,0,0],res[0]=1 res = [1,0,0,0] 2.从后往前加,循环 rowIndex-1 次,当前位=当前位+前一位 [1,0,0,0] [1(不变),1(=1+0),0,0] ...
分类:
其他好文 时间:
2020-02-16 14:32:52
阅读次数:
58