12 2021 档案

摘要:Function Infinite iterators (无限迭代) count() cycle() repeat() Combinatoric generators (排列组合) product() permutations() combinations() combinations_with_r 阅读全文
posted @ 2021-12-30 13:58 程序猿Time 阅读(240) 评论(0) 推荐(0)
摘要:以codewars中3 kyu Path Finder #3: the Alpinist 为例 题干: You are at start location [0, 0] in mountain area of NxN and you can only move in one of the four 阅读全文
posted @ 2021-12-29 23:05 程序猿Time 阅读(260) 评论(0) 推荐(0)
摘要:min() 与 max(),用法类似,都可以设置两个缺省(默认)参数,一个是key,一个是default。 其中,key参数指定实际比较对象(常用于输出字典中键值最大(小)的键); default参数设置当比较对象为empty时,输出的结果 实例(以max()函数为例): 1 # max 2 pri 阅读全文
posted @ 2021-12-28 22:57 程序猿Time 阅读(876) 评论(0) 推荐(0)