摘要:
#!/usr/bin/python import os import sys def print_files(path): lsdir = os.listdir(path) dirs = [i for i in lsdir if os.path.isdir(os.path.join(path,i)) 阅读全文
摘要:
计算阶层 普通方法: -使用循环 #!/usr/bin/python def factorial(n): sum = 1 for i in range(1,n+1): sum *= i return sum print factorial(5) 计算阶层 python 7.py 120 #!/usr 阅读全文