摘要:
1.来源: Python Regular Expressions Cheat Sheet 2.内容: Special Characters ^ | Matches the expression to its right at the start of a string. It matches eve 阅读全文
摘要:
1、不同路径 I:来源LeetCode62题 一个机器人位于一个 m x n 网格的左上角 (起始点在下图中标记为“Start” )。 机器人每次只能向下或者向右移动一步。机器人试图达到网格的右下角(在下图中标记为“Finish”)。 问总共有多少条不同的路径? 例如,上图是一个7 x 3 的网格。 阅读全文
摘要:
螺旋矩阵1:来源LeetCode54题 Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. Example 1: Example 2: mat 阅读全文
摘要:
1、将字典的key,value反转换位置 值value可以取任何数据类型,但键key必须是不可变的,如字符串,数字或元组。 dict1={'Lisa':1,'Bob':2,'Mick':3} dict2=dict([(value,key) for (key,value) in dict1.items 阅读全文