摘要: import string str1=string.ascii_uppercase #生成26个大写字母 list1 = list(str1) #将字符串转换成列表存储 for i in list1: i = input('请写一个(A-Z)范围内的数:') if i in list1: list1 阅读全文
posted @ 2021-08-04 18:01 夏夏夏天的西瓜 阅读(54) 评论(0) 推荐(0) 编辑
摘要: import pymysql # 导入数据库模块 # 将数据库相关内容进行封装: class Db_utils(): def __init__(self, host, database, user, password, port): self.db = pymysql.connect(host=ho 阅读全文
posted @ 2021-08-04 10:24 夏夏夏天的西瓜 阅读(315) 评论(0) 推荐(0) 编辑