![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
SuperRancho
有不谐者吾必击之!
展开
-
测试Python代码在CSDN中语法高亮的方法
import osimport sysprint "ni hao"原创 2014-06-30 18:30:39 · 556 阅读 · 0 评论 -
Python中查询当前执行目录的命令
hah原创 2014-07-01 09:35:25 · 853 阅读 · 0 评论 -
pl.plot()命令不能直接出图的解决方案
引用《Python科学计算》一书中的一小段代码原创 2014-07-01 10:53:06 · 2420 阅读 · 0 评论 -
python os模块总结
在Python的标准库os模块中包含普遍的操作系统功能。程序能够与平台,就靠这个模块了。下面是os模块常用的方法.1.os.sep 可以取代操作系统特定的路径分割符 2.os.name 字符串指示你正在使用的平台。比如对于Windows,它是'nt',而对于Linux/Unix用户,它是'posix' 3原创 2014-07-01 09:45:36 · 410 阅读 · 0 评论 -
Canopy中调用Numpy模块出错。
Canopy中调用Numpy模块出错。报错如下:原创 2014-07-03 09:45:47 · 2895 阅读 · 1 评论 -
Python 元组、列表、字典、文件的用法
转自 http://yangsq.iteye.com/blog/128508转载 2014-07-05 15:15:32 · 810 阅读 · 0 评论 -
Python中*args 和**kwargs的用法
原文地址:好久没有学习python了,应为工作的需要,再次拾起python,唤起记忆。当函数的参数不确定时,可以使用*args 和**kwargs,*args 没有key值,**kwargs有key值。还是直接来代码吧,废话少说[python] view plaincopyprint?def fun_var转载 2014-07-07 14:12:44 · 633 阅读 · 0 评论 -
python中xrange和range的异同
range 函数说明:range([start,] stop[, step]),根据start与stop指定的范围以及step设定的步长,生成一个序列。range示例:转载 2014-07-09 09:04:59 · 486 阅读 · 0 评论 -
python --enumerate用法
原文地址:http://blog.csdn.net/suofiya2008/article/details/5603861python cookbook Recipe 2.5. Counting Lines in a File , 今日发现一个新函数 enumerate 。一般情况下对一个列表或数组既要遍历索引又要遍历元素时,会这样写:for i in ra转载 2014-07-09 10:12:48 · 450 阅读 · 0 评论