十四. Python基础(14)--递归 1 ● 递归(recursion) 概念: recursive functions-functions that call themselves either directly or indirectly in order to loop. 最大递归层数: the default maximum recursion depth in Python is 997. 限制条件: 一定有一个分支不调用自身 修改最大递归层数: import sys sys.se…
十三. Python基础(13)--生成器进阶 1 ● send()方法 generator.send(value) Resumes the execution, and "sends" a argument which becomes the result of the current yield expression in the generator function. The send() method, like __next__(), returns the next v…
十二. Python基础(12)--生成器 1 ● 可迭代对象(iterable) An object capable of returning its members one at a time. Examples of iterables include all sequence types (such as list, str, and tuple) and some non-sequence types like dict and file and objects of any clas…