上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页
摘要: Python 内置函数:https://www.runoob.com/python/python-built-in-functions.html 原文:https://www.cnblogs.com/linhaifeng/articles/6113086.html#_label12 # 绝对值 # 阅读全文
posted @ 2019-11-07 17:37 月零Ray 阅读(181) 评论(0) 推荐(0)
摘要: map num_l = [1,6,8,9] def map_test(func,array): ret = [] for i in array: res = func(i) ret.append(res) return ret def jia(x): return x+1 #内置函数 print(m 阅读全文
posted @ 2019-11-06 01:45 月零Ray 阅读(194) 评论(0) 推荐(0)
摘要: import time animals_list = ['鲤鱼','乌龟','青蛙'] def find_mother(animals_list): time.sleep(1) animal = animals_list.pop(0) print('你好%s,你是我的妈妈么'%animal) tim 阅读全文
posted @ 2019-11-05 20:22 月零Ray 阅读(99) 评论(0) 推荐(0)
摘要: 转载:https://www.cnblogs.com/newt/p/8997586.html 编程的方法论: 面向过程 面向对象 函数式 函数式编程的定义: 函数式=编程语言定义的函数+数学意义上的函数(先想到一个数学模型,再用python上的功能实现这个逻辑) y = x + 1 def cat( 阅读全文
posted @ 2019-10-25 10:19 月零Ray 阅读(142) 评论(0) 推荐(0)
摘要: 原文:https://www.cnblogs.com/linhaifeng/articles/6113086.html#_label6 函数作用域 # def test1(): # print('in the test1') # def test(): # print('in the test') 阅读全文
posted @ 2019-10-24 10:43 月零Ray 阅读(115) 评论(0) 推荐(0)
摘要: 原文:https://www.cnblogs.com/linhaifeng/articles/6113086.html#_label6 函数之间可以进行嵌套 递归: 递归特性: 1. 必须有一个明确的结束条件 2. 每次进入更深一层递归时,问题规模相比上次递归都应有所减少 3. 递归效率不高,递归层 阅读全文
posted @ 2019-10-16 05:15 月零Ray 阅读(235) 评论(0) 推荐(0)
摘要: 原文:https://www.cnblogs.com/linhaifeng/articles/6113086.html 1.python中函数定义:函数是逻辑结构化和过程化的一种编程方法。 2.为什么使用函数: 1.代码重用 2.保持一致性,易维护 3.可扩展性 3.函数过程定义:过程就是简单特殊没 阅读全文
posted @ 2019-10-14 00:49 月零Ray 阅读(179) 评论(0) 推荐(0)
摘要: 借鉴:https://www.cnblogs.com/linhaifeng/articles/5935801.html https://www.cnblogs.com/wupeiqi/articles/5484747.html https://www.cnblogs.com/Manuel/p/105 阅读全文
posted @ 2019-10-13 22:51 月零Ray 阅读(210) 评论(0) 推荐(0)
摘要: 借鉴:https://www.cnblogs.com/shengyang17/p/8543712.html https://www.cnblogs.com/you-wei1/p/9693254.html 1.有两个列表 l1 = [11, 22, 33] l2 = [22, 33, 44] a.获取 阅读全文
posted @ 2019-10-09 13:58 月零Ray 阅读(598) 评论(1) 推荐(0)
摘要: # 一、数字 # int(..) # 二、字符串 # replace find join strip startswith split upper lower format # tempalte = "i am {name}, age : {age}" # # v = tempalte.format(name='alex',age=19) # v = tempalte.for... 阅读全文
posted @ 2019-10-09 11:29 月零Ray 阅读(148) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页