Skip to content
  • About Me

charlie笔记

A programmer’s note boke for work and life

作者:test31297505

python读写txt文件json文件的实现方法

20 6月01 1月 by test31297505

首先第一步,打开文件,有两个函数可供选择:open() 和 file() ①. f = open(&#8216 […]

Continue reading
Posted in 未分类 · Leave a comment

python队列详解及实例代码

20 6月01 1月 by test31297505

队列特性:先进先出(fifo)——先进队列的元素先出队列。来源于我们生活中的队列(先排队的先办完事)。 que […]

Continue reading
Posted in 未分类 · Leave a comment

shelve用来持久化任意的python对象实例代码

20 6月01 1月 by test31297505

shelve — 用来持久化任意的python对象 这几天接触了python中的shelve这个m […]

Continue reading
Posted in 未分类 · Leave a comment

解决python中字符串和数字拼接报错的方法

20 6月01 1月 by test31297505

前言 众所周知python不像js或者php这种弱类型语言里在字符串连接时会自动转换类型,如果直接将字符串和数 […]

Continue reading
Posted in 未分类 · Leave a comment

centos6.x系统下升级python2.6到python2.7的方法

20 6月01 1月 by test31297505

第一步:升级python centos 6.x的系统默认安装的python版本是2.6.x,想升级到pytho […]

Continue reading
Posted in 未分类 · Leave a comment

python异常处理总结

20 6月01 1月 by test31297505

最近,做个小项目经常会遇到python 的异常,让人非常头疼,故对异常进行整理,避免下次遇到异常不知所措,以下 […]

Continue reading
Posted in 未分类 · Leave a comment

python序列的方法总结

20 6月01 1月 by test31297505

最近在做python 的项目,特地整理了下 python 序列的方法。序列sequence是python中最基 […]

Continue reading
Posted in 未分类 · Leave a comment

python中使用global引发的一系列问题

20 6月01 1月 by test31297505

哪里出问题了   python 中,使用 global 会将全局变量设为本函数可用。同时,在函数内部访问变量会 […]

Continue reading
Posted in 未分类 · Leave a comment

python写入csv乱码问题解决方法

20 6月01 1月 by test31297505

需求背景 最近为公司开发了一套邮件日报程序,邮件一般就是表格,图片,然后就是附件。附件一般都是默认写到txt文 […]

Continue reading
Posted in 未分类 · Leave a comment

python使用str&repr转换字符串

20 6月01 1月 by test31297505

可能比较 low 还是记录一下: str 和 repr的使用过程 str 是一个类型 (int, long 类 […]

Continue reading
Posted in 未分类 · Leave a comment

python检测生僻字的实现方法

20 6月01 1月 by test31297505

解决思路 首先想到的就是利用 python 的正则表达式来匹配非法字符,然后找出非法记录。然而理想总是丰满的, […]

Continue reading
Posted in 未分类 · Leave a comment

python类中super()和

20 6月01 1月 by test31297505

单继承时super()和__init__()实现的功能是类似的 class base(object): def […]

Continue reading
Posted in 未分类 · Leave a comment

python判断某个用户对某个文件的权限

20 6月01 1月 by test31297505

在python我们要判断一个文件对当前用户有没有读、写、执行权限,我们通常可以使用os.access函数来实现 […]

Continue reading
Posted in 未分类 · Leave a comment

python内置函数complex详解

20 6月01 1月 by test31297505

英文文档: class complex([real[, imag]]) return a complex nu […]

Continue reading
Posted in 未分类 · Leave a comment

python首次安装后运行报错(0xc000007b)的解决方法

20 6月01 1月 by test31297505

错误提示如下: 其实这是一个挺常见的系统报错,缺乏vc++库。 我安装的是python3.5.2,这个版本需要 […]

Continue reading
Posted in 未分类 · Leave a comment

简单谈谈python中的反转字符串问题

20 6月01 1月 by test31297505

按单词反转字符串是一道很常见的面试题。在python中实现起来非常简单。 def reverse_string […]

Continue reading
Posted in 未分类 · Leave a comment

python做文本按行去重的实现方法

20 6月01 1月 by test31297505

文本: 每行在promotion后面包含一些数字,如果这些数字是相同的,则认为是相同的行,对于相同的行,只保留 […]

Continue reading
Posted in 未分类 · Leave a comment

windows下ipython的安装与使用详解

20 6月01 1月 by test31297505

ipython的安装 ipython可以直接使用pip install ipython安装 ,如果安装失败按如 […]

Continue reading
Posted in 未分类 · Leave a comment

python实现简单爬虫功能的示例

20 6月01 1月 by test31297505

在我们日常上网浏览网页的时候,经常会看到一些好看的图片,我们就希望把这些图片保存下载,或者用户用来做桌面壁纸, […]

Continue reading
Posted in 未分类 · Leave a comment

pythonappend、extend与insert的区别

20 6月01 1月 by test31297505

最近在自学python语言,看到向列表增加更多数据时被append(),extend(),insert()方法 […]

Continue reading
Posted in 未分类 · Leave a comment

python+django快速实现文件上传

20 6月01 1月 by test31297505

对于web开来说,用户登陆、注册、文件上传等是最基础的功能,针对不同的web框架,相关的文章非常多,但搜索之后 […]

Continue reading
Posted in 未分类 · Leave a comment

python中os模块详解

20 6月01 1月 by test31297505

os模块提供了对目录或者文件的新建/删除/查看文件属性,还提供了对文件以及目录的路径操作。比如说:绝对路径,父 […]

Continue reading
Posted in 未分类 · Leave a comment

python性能优化技巧总结

20 6月01 1月 by test31297505

选择了脚本语言就要忍受其速度,这句话在某种程度上说明了 python 作为脚本的一个不足之处,那就是执行效率和 […]

Continue reading
Posted in 未分类 · Leave a comment

python随笔之文档字符串(docstrings)

20 6月01 1月 by test31297505

在python中有一个奇妙的特性,文档字符串,又称为docstrings。用它可以为我们的模块,类,函数添加说 […]

Continue reading
Posted in 未分类 · Leave a comment

使用python实现8大排序算法

20 6月01 1月 by test31297505

插入排序的基本思想: 每步将一个待排序的纪录,按其关键码值的大小插入前面已经排序的文件中适当位置上,直到全部插 […]

Continue reading
Posted in 未分类 · Leave a comment

使用python实现8大排序算法

20 6月01 1月 by test31297505

希尔排序的基本思想: 希尔排序是基于插入排序的改进,由于插入排序对于已排好的数列操作时是高效的,但插入排序一般 […]

Continue reading
Posted in 未分类 · Leave a comment

使用python实现8大排序算法

20 6月01 1月 by test31297505

冒泡排序的基本思想: 冒泡排序是依次走访两个相邻的数,进行比较(除最后一个数),直到排序完成 。 例: arr […]

Continue reading
Posted in 未分类 · Leave a comment

使用python实现8大排序算法

20 6月01 1月 by test31297505

快速排序的基本思想: 通过一趟排序将要排序的数据分割成独立的两部分,其中一部分的所有数据都比另外一部分的所有数 […]

Continue reading
Posted in 未分类 · Leave a comment

python列表删除元素

20 6月01 1月 by test31297505

python 列表删除元素 python 删除元素的几种方式 方式一:使用del方法 python代码 >>> […]

Continue reading
Posted in 未分类 · Leave a comment

python操作mongodb

20 6月01 1月 by test31297505

import pymongo,sys from pymongo import mongoclient clie […]

Continue reading
Posted in 未分类 · Leave a comment

文章导航

先前文章
较新文章

近期文章

  • 15款互联网人必备的AI工具,效率提升2倍
  • 多个ChatGPT通用指令
  • Python采集biaozhun政府文件
  • TensorFlow库:Python中的深度学习
  • python 本地密码管理应用

近期评论

  • helenadmin发表在《Python采集biaozhun政府文件》
  • helenadmin发表在《写给程序员的一封公开信》
  • Google发表在《About Me》
  • helenadmin发表在《ES(ElasticSearch)分布式全文搜索引擎及使用方式》
  • buy viagra发表在《About Me》

文章归档

  • 2024年12月
  • 2024年9月
  • 2024年6月
  • 2024年5月
  • 2024年3月
  • 2024年2月
  • 2024年1月
  • 2023年12月
  • 2023年11月
  • 2023年10月
  • 2023年9月
  • 2023年8月
  • 2023年7月
  • 2023年6月
  • 2023年5月
  • 2023年4月
  • 2023年3月
  • 2023年2月
  • 2023年1月
  • 2022年12月
  • 2022年8月
  • 2022年7月
  • 2022年6月
  • 2022年5月
  • 2022年4月
  • 2022年3月
  • 2022年2月
  • 2022年1月
  • 2021年12月
  • 2021年11月
  • 2021年10月
  • 2021年9月
  • 2021年8月
  • 2021年7月
  • 2021年6月
  • 2021年5月
  • 2021年4月
  • 2021年3月
  • 2021年1月
  • 2020年12月
  • 2020年11月
  • 2020年10月
  • 2020年9月
  • 2020年8月
  • 2020年7月
  • 2020年6月
  • 2020年5月
  • 2020年4月
  • 2020年3月
  • 2020年2月
  • 2020年1月
  • 2019年12月
  • 2019年11月
  • 2019年10月
  • 2019年9月
  • 2019年8月
  • 2019年7月
  • 2019年6月
  • 2019年5月
  • 2019年4月
  • 2019年3月
  • 2019年2月
  • 2019年1月
  • 2018年12月
  • 2018年11月
  • 2018年10月
  • 2018年9月
  • 2018年7月
  • 2018年6月
  • 2018年3月
  • 2018年2月
  • 2018年1月
  • 2017年12月
  • 2017年11月
  • 2017年10月
  • 2017年9月
  • 2017年8月
  • 2017年7月
  • 2017年6月
  • 2017年5月
  • 2017年4月
  • 2017年3月
  • 2017年1月
  • 2016年12月
  • 2016年11月
  • 2016年10月
  • 2016年9月
  • 2016年8月
  • 2016年7月
  • 2016年6月
  • 2016年5月
  • 2016年4月
  • 2016年3月
  • 2016年2月
  • 2015年8月
  • 2015年7月
  • 2015年6月
  • 2015年5月
  • 2014年7月
  • 2014年6月
  • 2014年5月
  • 1970年1月

分类目录

  • Database
  • focus—-实时热搜
  • IC设计
  • js&jquery
  • PHP
  • Python
  • 新技术研习
  • 服务器相关技术
  • 算法
  • 缓存技术
  • 随笔

功能

  • 注册
  • 登录
  • 文章RSS
  • 评论RSS
  • WordPress.org
© 2025 charlie笔记 ·