![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
weiyier
这个作者很懒,什么都没留下…
展开
-
Python引号
python中单引号和双引号的效果是一样的 python 三引号的形式用来输入多行文本,也就是说在三引号之间输入的内容将被原样保留,之中的单号和双引号不用转义,其中可包含换行符、制表符及其他字符。三引号是一对连续的单引号或双引号原创 2012-06-23 09:29:23 · 706 阅读 · 0 评论 -
python strip lstrip rstrip 用法
python中的strip用于去除字符串的首位字符,同理,lstrip用于去除左边的字符,rstrip用于去除右边的字符。 这三个函数都可传入一个参数,指定要去除的首尾字符。 需要注意的是,传入的是一个字符数组,编译器去除两端所有相应的字符 当没有传入参数时,是默认去除首尾空格的。 string = 'say love me syas yaass' >>> print st原创 2012-06-25 11:01:55 · 1488 阅读 · 0 评论 -
python urllib.request
import urllib.request url = 'http://www.baidu.com' response = urllib.request.urlopen(url) text = response.read() textdecode = text.decode("utf8") response.close() print (textdecode)原创 2013-02-22 16:52:16 · 1106 阅读 · 0 评论 -
Windows 使用pip安装 Django
快速安装django可参考:https://docs.djangoproject.com/en/1.4/intro/install/ 使用pip安装时: 1. 安装python,一般安装python2.7 2. Python安装distribute:打开windows的cmd,切换到distribute-0.6.36目录. 输入:python setup.py install。运行就可以原创 2013-04-09 21:23:39 · 16298 阅读 · 0 评论