码迷,mamicode.com
首页 >  
搜索关键字:python 字符串内建函数    ( 135050个结果
Python中关于try...finally的一些疑问
最近看Vamei的Python文章,其中一篇讲异常处理的,原本看完没啥疑惑,或许是自己想的简单了。看到评论,一个园友的问题引起我的兴趣。他的问题是def func(x): try: return ++x finally: return x+1print fun...
分类:编程语言   时间:2014-06-15 06:47:20    阅读次数:228
关于在Python的注释不能用中文
在用中文进行注释的之后运行会有这样的提示:在文件头加上 #coding=utf-8这一行就可以用中文注释了
分类:编程语言   时间:2014-06-15 06:07:16    阅读次数:310
[leetcode]Add Two Numbers @ Python
原题地址:https://oj.leetcode.com/problems/add-two-numbers/题意:You are given two linked lists representing two non-negative numbers. The digits are stored i...
分类:编程语言   时间:2014-06-15 00:40:44    阅读次数:328
爬虫--用cookie访问任意网页
#!/usr/bin/env python# -*- coding: utf-8 -*-############################################## File : requestAnyURLWithCookie.py# Author : luc...
分类:Web程序   时间:2014-06-15 00:33:30    阅读次数:187
python getattr()
About getattrPython’s getattr function is used to fetch an attribute from an object, using a string object instead of an identifier to identify the at...
分类:编程语言   时间:2014-06-15 00:26:18    阅读次数:487
爬虫--登录网页
#!/usr/bin/env python# -*- coding: utf-8 -*-############################################## File : loginMMVOIP.py# Author : lucasysfeng# Re...
分类:Web程序   时间:2014-06-15 00:18:13    阅读次数:245
python的mp3play库试用
没有见过比这个更小型的库了,下面程序实现的功能:播放音乐,按空格键实现暂停和播放的切换。#coding=utf-8import mp3playimport pythoncom, pyHookinput = 0pauseFlag=1def onKeyboardEvent(event): glob...
分类:编程语言   时间:2014-06-14 20:09:54    阅读次数:366
ArcGIS10中matplotlib画图时的中文设置
利用GIS的数据批量生成XY的图形图像文件,可以直接使用Python。一般大家都是用matplotlib,中文设置的问题参看了许多内容,结论是对错不一,让我折腾了三天,现总结如下:1.软件的版本。安装测试的为numpy-1.6.1和matplotlib-1.1.0,WindowsXP系统。我原来系统...
分类:其他好文   时间:2014-06-14 19:15:22    阅读次数:471
python 实现计算数独
输入文件格式:008309100900060004007504800036000540001000600042000970005907300600010008004608200输出结果:yuan********************0 0 8 3 0 9 1 0 0 9 0 0 0 6 0 0 0...
分类:编程语言   时间:2014-06-14 19:02:06    阅读次数:226
Model Builder中Table2Table中字段映射的问题
ArcGIS10中使用过程中,Bug不少。尽管有了SP3,但模型耦合的深层次的应用中还是错误不少。目前只是遇到一个,利用躲避的方法解决一个。例如,从NetCDF中抽出的数据表,必须在内存和数据库中都存在的条件下,Python程序才能运行成功,花了许多时间才得出这样的躲避方法。如下图的抽取计算数据为例...
分类:其他好文   时间:2014-06-14 18:46:47    阅读次数:177
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!