摘要: 密码输入格式检查 要求密码长度为 6 到 20 位 密码只包含英文字母和数字 import re def checkPassword(): pw = input("please input your password:") pwObj = re.compile(r'[\da-zA-Z]{6,20}' 阅读全文
posted @ 2020-04-24 17:55 生命就是不停地雕刻时光 阅读(176) 评论(0) 推荐(0)
摘要: 查看对象属性 class type(name,bases,dict) 传入一个参数时,返回 object 的类型: #!/usr/bin/python3 class Student(): def __init__(self,id,name): self.id = id self.name = nam 阅读全文
posted @ 2020-04-24 17:07 生命就是不停地雕刻时光 阅读(139) 评论(0) 推荐(0)