Python
PKU_CXK
北京大学信息科学技术学院
展开
-
Python2和Python3的区别
python3和Python2的区别 print函数:(Python3中print为一个函数,必须用括号括起来;Python2中print为class)Python 2 的 print 声明已经被 print() 函数取代了,这意味着我们必须包装我们想打印在小括号中的对象。Python 21234print转载 2017-01-11 22:57:53 · 1212 阅读 · 0 评论 -
Python安装第三方库(macOS)
笔者是Python初学者,谨将自己遇到的问题悉数写下,希望给自己提个醒以免忘记,另一面也可以给后生一个同辈的引导,少走弯路。问题1:在写python的实战时,将会遇到几个经典而且常用的库,例如写爬虫时需要用到的urllib pyquery requests等等,如何安装pip,以及如何用pip安装第三方库。osx的python2本身自带pip,如果学习python2.7那么安装pip的过程这步可转载 2017-08-01 13:21:24 · 2598 阅读 · 0 评论 -
Xcode配置Python开发环境
步骤详细简单,详情见链接: http://m.2cto.com/kf/201612/579604.html原创 2017-07-27 21:08:55 · 4074 阅读 · 0 评论 -
LeetCode | 88. Merge Sorted Array
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note: You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold additional原创 2017-10-16 19:01:53 · 978 阅读 · 0 评论 -
pip3速度慢,换源的问题
临时换源: pip3 install 包名 -i 源的url国内源列表 清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/阿里云 http://mirrors.aliyun.com/pypi/simple/中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/豆瓣(douban) http://p...原创 2018-05-30 17:12:29 · 6087 阅读 · 0 评论