设计模式
设计模式 一、创建型模式 1. 单例模式 1.1请手写一个单例 #encoding=utf8 import threading import time #这里使用方法__new__来实现单例模式 class Singleton(object):#抽象单例 def __new__(cls, *args, **kw): if not hasattr(c…
模块
模块 1.列举常用的模块。 基础: os,sys,time,datetime,json,pickle,randon,hashlib,re,math,logging 爬虫: requests,BeautifulSoup,xpath,gevent,asyncio,twisted 数据分析: pandas,numpy,scipy,matplotlib,s…
网络和并发编程
网络和并发编程 1.python的底层网络交互模块有哪些? # 答案: ''' socket, urllib,urllib3 , requests, grab, pycurl ''' 2.简述OSI七层协议。 # 答案: ''' 应用层:HTTP,FTP,NF…