python递归列出目录及其子目录下所有文件 一.前言 函数的递归,简单来说,就是函数内部调用自己 先举个小例子,求阶乘 def factorial(n): if n == 0: return 1 else: return n * factorial(n-1) 递归要注意两个事项: 1.必须要有最后的默认结果,也就是最底层目录的默认结果 if n == 0 2.递归参数必须向默认结果收敛 factorial(n-1) 要用到 os 模块下的几个方法 要用到 os 模块下的几个方法 二.递归列出目…
11 Python Libraries You Might Not Know by Greg | January 20, 2015 There are tons of Python packages out there. So many that no one man or woman could possibly catch them all. PyPi alone has over 47,000 packages listed! Recently, with so many data sci…