Python
1)tkinter 模块找不到解决方案:python3以后tk都是内置在python内,在安装python时需要勾选tk安装选项,如果已经安装,则需要modify。
2)pip install 出现read time out 很可能是国内找不到安装包,可以利用国内镜像下载!
3)__str__;__len__等属于内建函数,调用str(类对象实例)
4)列表[] a=[] 元祖() a=(1,2,3)字典{}a=dict() zip(a,b) 把两个列表打包成[(),()]形式 list remove 无法删除指定位的数值,del 和pop可以删除指定位置的数值
5)enumerate可以返回下标和数值组合,set集合 返回有序无重复字典。sorted返回排序后的集合。
6)charmap 'charmap' codec can't decode byte 0x8f in position 311: character maps to <undefined>  可能是文件编码原因,加一个encoding=“utf-8”
7)Collections.Counter 可以返回list值和计数的字典。
8)python3 可以利用python 3to2 库将python3代码转换成python2代码。
server1.setblocking(False)
            server1.settimeout(3)
            server1.connect((self.ip, 22))
            server1.shutdown(2)
            server1.close()
socket.socket(socket.AF_INET, socket.SOCK_STREAM)不能重复声明
10)list index() find()append extend pop count reverse 字典 get(a,b) 如果键a有值则取出来 否则返回值b
                    
                
                
            
        
浙公网安备 33010602011771号