![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python基础
文章平均质量分 79
freedom311
这个作者很懒,什么都没留下…
展开
-
Python中map函数
Python中map(),帮助文档: class map(object) | map(func, *iterables) –> map object | | Make an iterator that computes the function using arguments from | each of the iterables. Stops when the shor原创 2017-10-27 11:38:59 · 281 阅读 · 0 评论 -
python中reduce函数
Python中reduce函数,帮助文档:>>> from functools import reduce>>> help(reduce)Help on built-in function reduce in module _functools:reduce(...) reduce(function, sequence[, initial]) -> value Apply a fu原创 2017-10-27 11:55:40 · 634 阅读 · 0 评论 -
python中filter函数
python中filter函数用于筛选序列,filter(func,lst)包含两个参数,第一个参数为函数,第二个参数为可迭代对象,func作用于lst中每一个元素,根据返回的结果TRUE或者FALSE来决定结果的取舍。number_list = range(1,20)def iseven(lst): return lst%2==0result = filter(iseven, number_...原创 2017-10-24 13:26:18 · 1495 阅读 · 0 评论 -
Python3.6国际化
安装完Python软件之后,在Python安装目录下面会自带国际化的程序。比如:我的Python安装目录为D:\ProgramData\Anaconda3,因此国际化程序所在目录就是D:\ProgramData\Anaconda3\Tools\i18n。其国际化目录下面包含几个文件: Python国际化可以根据以下四个步骤来做: 1>首先将需要国际化的目标字符串使用_()包起来,注意:如果原创 2018-02-07 14:07:12 · 1898 阅读 · 0 评论