用户自己引发的异常处理 代码 ```python encoding = UTF-8 用户自己引发异常 class ShortInputExcep...
最新文章
benym的知识笔记 还有 11 篇
with open异常处理 代码 ```python with open("poem.txt") as f: for line in f: print(l...
finally异常处理 代码 ```python import sys import time f = None try: f = open("poem.txt")...
简单的异常处理 代码 ```python try: text = input('Enter someting -- except EOFError: 按ct...
Python的pickle模块 Python 提供了一个叫作 Pickle 的标准模块,通过它你可以将任何纯 Python 对象存储...
输入输出——回文字串的判断(加强版) 代码 ```python forbindden_word = (' ', ',', ';', '.', '!', '...
文件操作 代码 ```python poem = ''' Programming is fun When the work is done if you wanna make y...
输入输出——简单的回文判断 代码 ```python ''' 可以通过使用 seq[a:b] 来从位置 a 开 始到位置 b 结束...
继承的运用 代码 ```python 继承的运用 coding = UTF-8 class SchoolMember: '''代表学校里的成...
类变量与对象变量 代码 ```python coding=UTF-8,类变量与对象变量 class Robot: """表示有一个带...
Python对象的实例化 代码 ```python ''' __init__ 方法会在类的对象被实例化(Instantiated)时立即运...
利用Python进行文件的自动备份(第三版和第四版) 代码 ```python import os import time ''' 第三版和...
文章没加载出来。
— 已经到底 —