![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
qq_35381464
这个作者很懒,什么都没留下…
展开
-
Python通过身份证获取年龄、性别和生日
class GetInformation(object): def __init__(self,id): self.id = id self.birth_year = int(self.id[6:10]) self.birth_month = int(self.id[10:12]) self.birth_day =...原创 2019-10-25 10:23:09 · 4820 阅读 · 0 评论 -
Python使用Crypto/pyDes,DES并Base64编码
注意点一、秘钥必须是8位二、待加密的明文长度必须是8的倍数,不足则补空字符第三方库from Crypto.Cipher import DESimport base64加密函数def encrypt_des(cipher): if cipher is None: return "" try: key = '1234A#CD'...转载 2019-08-22 09:25:47 · 1396 阅读 · 0 评论 -
随机生成不重复的手机号
import randomdef raddomPhone(): headList = ["130", "131", "132", "133", "134", "135", "136", "137", "138", "139", "147", "150", "151", "152", "153", "155", "156", "157", "158", "...原创 2019-08-22 10:11:39 · 1642 阅读 · 0 评论