摘要: 源:http://www.liaoxuefeng.com1、注意这里用了一个“创建一个匿名函数并立刻执行”的语法:(function (x) { return x * x;})(3); // 9理论上讲,创建一个匿名函数并立刻执行可以这么写:function (x) { return x * ... 阅读全文
posted @ 2015-08-05 19:42 oiliu 阅读(168) 评论(0) 推荐(0) 编辑
摘要: # 条件判断elif: else if 的作用注意: : 【冒号】BMI =w/(h*h)if BMI10: n-1 print(n)二、n = 20while n > 10: n = n-1 print('1',n)一和二的不同,,,#dict和setdict 字典 dic... 阅读全文
posted @ 2015-08-05 18:23 oiliu 阅读(241) 评论(0) 推荐(0) 编辑
摘要: list 类型,这不就是js里的数组吗,,最后一个元素索引是 -1list是一个可变的有序的表,#追加.append('admin')#插入.insert(1,'admin')#删除末尾元素.pop()#删除指定位置元素.pop(1)####多维数组 list内包含list p=['a','b','... 阅读全文
posted @ 2015-08-05 16:39 oiliu 阅读(236) 评论(0) 推荐(0) 编辑