随笔分类 - python
摘要:Camp时在python2的编码上坑了不少。 理解pyhon2的编码 python3的编码 Python 2 将 strings 处理为原生的 bytes 类型,而不是 unicode, Python 3 所有的 strings 均是 unicode 类型。 utf-8编码兼容ascii编码,ass
阅读全文
摘要:https://blog.csdn.net/jenyzhang/article/details/52046372
阅读全文
摘要:makedata.cpp 1 #include <bits/stdc++.h> 2 3 int main() { 4 int n = rand()%2000+1, k = rand()%n+1; 5 printf("%d %d\n", n, k); 6 std::vector<int> v; 7 f
阅读全文
摘要:Python closures and late binding A closure occurs when a function has access to a local variable from an enclosing scope that has finished its executi
阅读全文
摘要:http://cuiqingcai.com/3179.html 1 # *-* coding: UTF-8 *-* 2 import urllib2 3 import cookielib 4 import re 5 import time 6 import os 7 8 9 ############
阅读全文
摘要:爬贴吧小说。 爬取该链接中的楼主发言前10页另存为文本文件 python2.7
阅读全文
摘要:这个星期开始学习Python了,因为看的书都是基于Python2.x,而且我安装的是Python3.1,所以书上写的地方好多都不适用于Python3.1,特意在Google上search了一下3.x和2.x的区别。特此在自己的空间中记录一下,以备以后查找方便,也可以分享给想学习Python的frie
阅读全文