摘要: 一 函数的定义和调用 def 关键字 函数名(设定与变量相同): 函数体 例子 1 #函数定义 2 def mylen(): 3 """计算s1的长度""" 4 s1 = "hello world" 5 length = 0 6 for i in s1: 7 length = length+1 8 阅读全文
posted @ 2018-04-17 12:46 huningfei 阅读(256) 评论(0) 推荐(0) 编辑
levels of contents