将元组作为一个记录存入列表中: traveler_ids=[('USA','311'),('BRA','342'),('ESP','566')] for passport in sorted(traveler_ids): print("%s%s"%passport) 元组拆包: city,year, ...
分类:
其他好文 时间:
2020-07-15 01:29:17
阅读次数:
87
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or ...
分类:
其他好文 时间:
2020-07-14 21:56:23
阅读次数:
98
1、LeetCode 160 相交链表 题目链接:https://leetcode-cn.com/problems/intersection-of-two-linked-lists/ 编写一个程序,找到两个单链表相交的起始节点。 如下面的两个链表: 在节点c1开始相交。 示例 1: 输入:inter ...
分类:
其他好文 时间:
2020-07-14 18:13:25
阅读次数:
53
uni.uploadFile({ url: this.action,阿里云上传地址 filePath: this.lists[index].url,上传的图片路径 name: this.name, formData:{ 'name':this.lists[index].url,上传的图片路径 'ke ...
分类:
移动开发 时间:
2020-07-14 13:29:43
阅读次数:
559
题目描述 输入两个单调递增的链表,输出两个链表合成后的链表,当然我们需要合成后的链表满足单调不减规则。 C++实现: class Solution { public: ListNode* Merge(ListNode* pHead1, ListNode* pHead2) { if(!pHead1) ...
分类:
编程语言 时间:
2020-07-13 21:31:49
阅读次数:
60
Redis 数据类型介绍 redis不是简单的k-v存储,他是一个数据结构服务器,支持不同类型的值。这里的v不仅仅可以是字符串。可以是下面多有别的类型: 二进制安全的字符串 Lists: 按插入顺序排序的字符串元素的集合。他们基本上就是链表(linked lists)。 Sets: 不重复且无序的字 ...
分类:
其他好文 时间:
2020-07-13 15:31:26
阅读次数:
60
dl = [ { "viewTimes": 236, "topTimes": 49, "stepsNum": 76, "collTimes": 321 }, { "viewTimes": 236, "topTimes": 47, "stepsNum": 58, "collTimes": 344 }, ...
分类:
其他好文 时间:
2020-07-13 13:23:29
阅读次数:
60
On branch master Your branch and 'origin/master' have diverged, and have 1 and 1 different commits each, respectively. (use "git pull" to merge the re ...
分类:
其他好文 时间:
2020-07-13 09:17:54
阅读次数:
58
python语言: import re while True: try: line = raw_input() li = re.findall(r'[a-zA-z0-9 ]', line) s = ''.join(set(li)) dic = {} for x in s: dic[x] = line ...
分类:
编程语言 时间:
2020-07-12 22:08:22
阅读次数:
82
给定一些标记了宽度和高度的信封,宽度和高度以整数对形式 (w, h) 出现。当另一个信封的宽度和高度都比这个信封大的时候,这个信封就可以放进另一个信封里,如同俄罗斯套娃一样。 请计算最多能有多少个信封能组成一组“俄罗斯套娃”信封(即可以把一个信封放到另一个信封里面)。 说明: 不允许旋转信封。 示例 ...
分类:
其他好文 时间:
2020-07-12 18:53:39
阅读次数:
61