Python教程

Python教程:包含了所有代写案例以及部分答案

  • class JianKong(): ”’查询IDC信息,封ip和过白名单”’ def __init__(self): pass @classmethod def ip_verify(cls,str): ‘验证IP地址规范’ pattern=re.compile(‘(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1 … 继续阅读“python 匹配IP和匹配域名”

    :
  • 文件型数据库sqllite读写操作:“`python None MySQL数据库读写操作:“`python def ExecSql(sql, dbName="", host="", user="", passwd="", charset=”): import MySQLdb conn = MySQLdb.connect(host=host, user=user, passwd=passwd, char … 继续阅读“Python数据库操作”

    :
  • values = [4, 10, 3, 8, -6] for i in range(len(values)): print(i, values[i]) 标签:python

    :
  • #!/usr/bin/env python import zipfile z = zipfile.ZipFile("test.zip","r") for filename in z.namelist(): print ‘File:’,filename, bytes = z.read(filename) print ‘has’,len(bytes),’bytes’ 标签:python

    :