标签:
#About Module #import sample_module.py import sample_module sample_module.fib(100) print(sample_module.__name__) from sample_module import fib fib(100) import math print(math.pi) #Exception try: number = 1*100/0 print(number) except: print(‘error‘) try: raise Exception(‘raise an exception!‘) except Exception: print(‘error‘) try: raise Exception except: print(‘Exception‘) finally: print(‘finished!‘) #File 统计目录下 test.txt 文件 with open(r‘test.txt‘,‘r‘) as f: for line in f: print(line,end="")
标签:
原文地址:http://www.cnblogs.com/longsheng/p/5953178.html