Python
python
bob62856
这个作者很懒,什么都没留下…
展开
-
python3爬虫基础学习
python3爬虫转载 2017-08-15 10:09:30 · 521 阅读 · 0 评论 -
python3代码块
代码块可以使得一段python代码作为一个单元、一个整体执行。以下是 官方手册 的描述。所以,有以下几种类型的代码块:模块文件是一个代码块函数体是一个代码块class的定义是一个代码块交互式(python idle)的每一个命令行都是一个独立的代码块脚本文件是一个代码块脚本命令是一个代码块(python -c “xxx”)eval()和exec()中的内容也都有各自的代码块代...转载 2020-03-09 10:58:33 · 1857 阅读 · 1 评论 -
python3初学者注意事项
1、python3没有字符类型,一个字符就是长度为1的字符串2、python3字符串可以从右往左以-1索引,C++不支持3、python3有列表[],元组(),集合{},字典{key:value}列表元素可以改变,元组元素不可改变包含一个0或1个元素的元组的特殊语法:tup1=() #空元组tup2=(10,)#一个元素,注意要加逗号列表、元组、集合中的多行语句,不需要使用反...原创 2020-03-02 13:07:40 · 237 阅读 · 0 评论 -
python3作用域
python3的作用域和C/C++有所不同按照L -> E -> G -> B的顺序查找变量L (Local) 局部作用域E (Enclosing) 闭包函数外的函数中G (Global) 全局作用域B (Built-in) 内建作用域只有在模块module,类class,函数def、lambda中才可以改变作用域,其他情况不可。例1for i in r...原创 2020-03-09 10:14:53 · 244 阅读 · 0 评论 -
python3 发送邮件
文章链接:https://blog.csdn.net/winter199/article/details/90081078转载 2020-03-13 12:06:03 · 111 阅读 · 0 评论 -
python过滤敏感词
题目:敏感词文本文件 filtered_words.txt,当用户输入敏感词语,则用 星号 * 替换,例如当用户输入「北京是个好城市」,则变成「**是个好城市」 代码:#coding=utf-8def filterwords(x): with open(x,'r') as f: text=f.read() print text.split('\n') us转载 2017-08-29 15:19:53 · 8411 阅读 · 0 评论 -
python统计代码行数
python统计代码行数转载 2017-08-28 21:00:46 · 1256 阅读 · 0 评论 -
python生成激活码
python生成激活码转载 2017-08-28 19:30:23 · 3536 阅读 · 0 评论 -
python统计文本中单词出现次数
统计单词出现的个数转载 2017-08-28 19:57:46 · 14848 阅读 · 0 评论 -
python爬到的图片根据颜色组成HelloWorld
这个先mark一下,以后有能力了实现一下原创 2017-08-06 21:32:30 · 322 阅读 · 0 评论 -
python图片转字符画
python图片转字符画转载 2017-08-28 18:58:35 · 1039 阅读 · 1 评论 -
python中BeautifulSoup简单使用
BeautifulSoup转载 2017-08-28 21:43:10 · 269 阅读 · 0 评论 -
python统计文章单词次数
python统计文章单词次数转载 2017-08-28 20:46:29 · 2554 阅读 · 0 评论 -
python给图片添加字符
python给图片添加字符转载 2017-08-28 19:07:35 · 1569 阅读 · 0 评论 -
python文件运行问题
python文件运行问题原创 2017-08-17 17:14:08 · 551 阅读 · 0 评论 -
python制作缩略图
python制作缩略图转载 2017-08-28 20:14:30 · 5718 阅读 · 2 评论 -
python生成验证码
python生成验证码转载 2017-08-28 22:05:46 · 489 阅读 · 0 评论 -
python 数据库的Connection、Cursor两大对象
文章链接:https://blog.csdn.net/guofeng93/article/details/53994112转载 2020-03-11 14:36:20 · 278 阅读 · 0 评论