标签:count tar rap war fun code __name__ art *args
import time def count_time(func): def wrapper(*args, **kwargs): start_time = time.time() count = func(*args, **kwargs) print(‘程序共计%s秒‘ % (time.time() - start_time)) return count return wrapper @count_time def main(count): for i in range(1, count): for j in range(i): print(j) return count if __name__ == ‘__main__‘: print(main(100))
标签:count tar rap war fun code __name__ art *args
原文地址:https://www.cnblogs.com/john-xiong/p/13161579.html