#查看内置函数 dir(__builtins__) # abs() 函数返回数字的绝对值。 print ("abs(-40) : ", abs(-40)) print ("abs(100.10) : ", abs(100.10)) # all() 函数用于判断给定的可迭代参数 iterable 中的... ...
分类:
编程语言 时间:
2019-03-16 23:43:13
阅读次数:
276
问题:在func3()里打印的n的值是多少? 30 LEGB代表名字查找顺序:locals -> enclosing function -> globals -> _builtins_ locals 是函数内的名字空间,包括局部变量和形参 enclosing 是外部嵌套函数的名字空间 globals ...
分类:
编程语言 时间:
2019-02-16 13:41:52
阅读次数:
175
1.系统自带的函数: >>> dir(__builtins__) ['ArithmeticError', 'AssertionError', 'AttributeError', 'BaseException', 'BlockingIOError', 'BrokenPipeError', 'Buffe ...
分类:
编程语言 时间:
2019-02-11 20:01:57
阅读次数:
176
>>>help(__builtins__) 重定向 1. HTML 重定向/Meta 刷新将下面 HTML 重定向代码放在网页的 <head> 节点内:<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.yourdomain.com"> 上述代 ...
分类:
其他好文 时间:
2019-01-30 13:01:40
阅读次数:
104
python附录-builtins.py模块str类源码 str官方文档链接:https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str builtins.py ...
分类:
编程语言 时间:
2019-01-27 21:40:32
阅读次数:
478
Django官方文档 可见https://docs.djangoproject.com/en/1.11/ref/templates/builtins/#std:templatetag-for 和python一样,Django也有自己的语法 常用语法:{{ XXX}},{% xxx %} 举个例子 然 ...
分类:
其他好文 时间:
2019-01-20 17:34:20
阅读次数:
225
官网链接:https://www.tensorflow.org/api_docs/python/tf/estimator/Estimator class Estimator(builtins.object)一 介绍Estimator 类,用来训练和验证 TensorFlow 模型。Estimator ...
分类:
其他好文 时间:
2018-12-20 15:43:40
阅读次数:
443
一、内建函数: 1.内建函数:比如sum:sum(list) 2.查看内建函数:dir(__builtins__) 二、匿名函数: b = lambda x : x * x c = lambda x, y: x + y 三、不定长参数: def printinfo(arg1, *args): pri ...
分类:
其他好文 时间:
2018-12-16 11:07:48
阅读次数:
106
1.日期及时间格式 文档地址:https://docs.djangoproject.com/zh-hans/2.0/ref/templates/builtins/#date ...
分类:
其他好文 时间:
2018-12-15 13:40:28
阅读次数:
146
dir(__builtins__) 查看内置函数 hlep(函数) 帮助 str=r'sadada' r自动转义 type() -- 查看数据类型 isinstance 验证是什么类型数据 small = x if x < y else y --三元运算符 assert 断言 assert 3>4 ...
分类:
编程语言 时间:
2018-11-29 21:48:40
阅读次数:
210