摘要: 思路来自算法图解, 比自己写的更pythonic。 def fun(list): if len(list) < 2: return list else: pivot = list[0] low = [i for i in list[1:] if i <= pivot] high = [i for i 阅读全文
posted @ 2018-03-31 19:44 Ruohua3kou 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 从2.x过渡到3.x的时候,遇到了大大小小的坑,于是便记录下来~ 1.print: 3.x 所有print都要加 "( )",print更像(就是)一个函数了。 2.x 可以加"( )"也可以不加 2.除法: 3.x print(3/2) #1.5 2.x print 3/2 #1 3.range与 阅读全文
posted @ 2018-03-31 17:36 Ruohua3kou 阅读(128) 评论(0) 推荐(0) 编辑