摘要:
#!/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)) 阅读全文
posted @ 2017-09-14 09:40
Oops!#
阅读(376)
评论(0)
推荐(0)
摘要:
计算阶层 普通方法: -使用循环 #!/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 阅读全文
posted @ 2017-09-14 09:22
Oops!#
阅读(255)
评论(0)
推荐(0)