Skip to content
  • About Me

charlie笔记

A programmer’s note boke for work and life

作者:test31297505

python常用函数

20 6月01 1月 by test31297505

一、数学相关 1、绝对值:abs(-1) 2、最大最小值:max([1,2,3])、min([1,2,3]) […]

Continue reading
Posted in 未分类 · Leave a comment

python装饰器

20 6月01 1月 by test31297505

编写自定义装饰器有许多方法,但最简单和最容易理解的方法是编写一个函数,返回封装原始函数调用的一个子函数。 通用 […]

Continue reading
Posted in 未分类 · Leave a comment

python单下划线/双下划线使用总结

20 6月01 1月 by test31297505

python 用下划线作为变量前缀和后缀指定特殊变量/方法。 主要存在四种情形 1. 1. object # […]

Continue reading
Posted in 未分类 · Leave a comment

python类私有方法

20 6月01 1月 by test31297505

类私有方法 __private_method 两个下划线开头,声明该方法为私有方法,不能在类地外部调用。 在类 […]

Continue reading
Posted in 未分类 · Leave a comment

abyteofpython之回文

20 6月01 1月 by test31297505

回文即顺着读和倒着读都一样的字符串。 建立文件palindrome.py,敲入如下代码: #设置需要过虑的标点 […]

Continue reading
Posted in 未分类 · Leave a comment

python程序的执行原理

20 6月01 1月 by test31297505

1. 过程概述   python先把代码(.py文件)编译成字节码,交给字节码虚拟机,然后虚拟机一条一条执行字 […]

Continue reading
Posted in 未分类 · Leave a comment

python数据库相关操作

20 6月01 1月 by test31297505

主要是通过python的dbutils库、mysqldb库来实现连接池操作数据库 import mysqldb […]

Continue reading
Posted in 未分类 · Leave a comment

python闭包中变量引用分析

20 6月01 1月 by test31297505

标题看起来很虎人,其实不敢称为分析。自己这方面仍有欠缺,以前也许还行,现在专门研究语言的时间和精力没那么多了。 […]

Continue reading
Posted in 未分类 · Leave a comment

python的bind函数

20 6月01 1月 by test31297505

# -*- coding:utf-8 -*-class functor(object): def __init […]

Continue reading
Posted in 未分类 · Leave a comment

python时间格式化

20 6月01 1月 by test31297505

函 数strftime()的操作有些类似于sprintf():识别以百分号(%)开始的格式命令集合,格式化输出 […]

Continue reading
Posted in 未分类 · Leave a comment

python

20 6月01 1月 by test31297505

这个模块只有几个函数, 一旦决定使用二分搜索时,立马要想到使用这个模块  import bisect l = […]

Continue reading
Posted in 未分类 · Leave a comment

python面试题

20 6月01 1月 by test31297505

# name, age, score tom, 12, 86 lee, 15, 99 lucy, 11, 58 […]

Continue reading
Posted in 未分类 · Leave a comment

python变长参数

20 6月01 1月 by test31297505

感觉python的变长参数还是蛮好用的,记录下,便于查询。 def selectsql(self, sqlst […]

Continue reading
Posted in 未分类 · Leave a comment

python元类

20 6月01 1月 by test31297505

元类有什么用? 很好的问题,元类将用在创建使用了它的新类时调用,这里是一些关于这样做的好处的观点: ◆ 装饰( […]

Continue reading
Posted in 未分类 · Leave a comment

用python语言实现的最短路spfa算法

20 6月01 1月 by test31297505

最近在学习python,对于一个c系列语言深度中毒的人来说很多问题需要抛弃旧的认识并重新理解 #coding= […]

Continue reading
Posted in 未分类 · Leave a comment

python高级之

20 6月01 1月 by test31297505

python一切皆对象(object),每个对象都可能有多个属性(attribute)。python的属性有一 […]

Continue reading
Posted in 未分类 · Leave a comment

python判断闰年

20 6月01 1月 by test31297505

#-*- coding:utf-8 -*- try: year = int(raw_input(‘ […]

Continue reading
Posted in 未分类 · Leave a comment

python的range()方法

20 6月01 1月 by test31297505

使用python的人都知道range()函数很方便,今天再用到他的时候发现了很多以前看到过但是忘记的细节。这里 […]

Continue reading
Posted in 未分类 · Leave a comment

python实现二叉树的中序遍历

20 6月01 1月 by test31297505

#!/usr/bin/env python # coding=utf-8 # inorderbl.py imp […]

Continue reading
Posted in 未分类 · Leave a comment

pythonshelve模块

20 6月01 1月 by test31297505

shelve shelve是一额简单的数据存储方案,他只有一个函数就是open(),这个函数接收一个参数就是文 […]

Continue reading
Posted in 未分类 · Leave a comment

python中文乱码

20 6月01 1月 by test31297505

开始接触python脚本,一上来就碰到了中文乱码问题。 结合网上的资料,现整理下: 字符串在python内部的 […]

Continue reading
Posted in 未分类 · Leave a comment

python字符串反转

20 6月01 1月 by test31297505

python 字符串反转 1. python 字符转切片实现 python代码 name = tramp pr […]

Continue reading
Posted in 未分类 · Leave a comment

python类以及继承操作代码示例

20 6月01 1月 by test31297505

直接贴自己写的代码做参考: #encoding=utf-8 __author__ = ‘admin […]

Continue reading
Posted in 未分类 · Leave a comment

python列表list去重

20 6月01 1月 by test31297505

python 列表list去重 一.{}.fromkeys(list).keys() list2 = {}.f […]

Continue reading
Posted in 未分类 · Leave a comment

python入门读写文件

20 6月01 1月 by test31297505

1.打开文件,读取所有内容 file_object = open(‘thefile.txt&#82 […]

Continue reading
Posted in 未分类 · Leave a comment

python的函数定义和调用

20 6月01 1月 by test31297505

forward declaration http://en.wikipedia.org/wiki/forwar […]

Continue reading
Posted in 未分类 · Leave a comment

python数组

20 6月01 1月 by test31297505

python数组1,常见习题: 测试题: 0.列表都可以存放一些什么东西? 答:整数,浮点数,字符串,对象,存 […]

Continue reading
Posted in 未分类 · Leave a comment

pythonlist排序

20 6月01 1月 by test31297505

实例1: >>>l = [2,3,1,4] >>>l.sort() >>>l >>>[1,2,3,4] 实例2 […]

Continue reading
Posted in 未分类 · Leave a comment

python实现二叉查找树

20 6月01 1月 by test31297505

# -*- coding: cp936 -*- #————&# […]

Continue reading
Posted in 未分类 · Leave a comment

python中bisect模块用法实例

20 6月01 1月 by test31297505

本文实例讲述了python中bisect模块用法,分享给大家供大家参考。 具体方法分析如下: 这个模块只有几个 […]

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笔记 ·