码迷,mamicode.com
首页 >  
搜索关键字:python 时间处理    ( 135516个结果
python解释器的下载
官网下载地址(已存网盘):https://www.python.org 注:查看所有版本也可以选择32位或64位的解释器,X86就是32位、X86-64就是64位的 再推荐把官方文档也下载一下: 安装: 双击下载好的解释器exe文件 -- (install now 为安装位置;customize i ...
分类:编程语言   时间:2021-01-26 11:53:22    阅读次数:0
python lambda使用方法
在Python中有两种函数,一种是def定义的函数,另一种是lambda函数,也就是大家常说的匿名函数。今天我就和大家聊聊lambda函数,在Python编程中,大家习惯将其称为表达式。 1.为什么要用lambda函数? 先举一个例子:将一个列表里的每个元素都平方。 先用def来定义函数,代码如下 ...
分类:编程语言   时间:2021-01-26 11:50:43    阅读次数:0
python中map使用的方法
map()函数 map()是 Python 内置的高阶函数,它接收一个函数 f 和一个 list,并通过把函数 f 依次作用在 list 的每个元素上,得到一个新的 list 并返回。 1、当seq只有一个时,将函数func作用于这个seq的每个元素上,并得到一个新的seq。 例如,对于list [ ...
分类:编程语言   时间:2021-01-26 11:49:25    阅读次数:0
python 批量重命名
import os def remove_filename(path_dir, start, end): files = [f for f in os.listdir(path_dir) if f.startswith(start) and f.endswith(end)] for file_nam ...
分类:编程语言   时间:2021-01-26 11:48:41    阅读次数:0
python快速下载第三方包
一、说在前面 我在用pip下载包时经常有下载比较慢和如下错误的问题 Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/pipenv/ 二、解决方法 默认pip是使用Python官方的源,但是由于国外官方源经常被墙,导致不可用,我 ...
分类:编程语言   时间:2021-01-26 11:47:24    阅读次数:0
Python:万能异常之`try:` `except <Errortype> as <alias> :` `else:` `finally:`(转)
万能异常之try: except <Errortype> as <alias> : else: finally:(转) 链接: try: except <Errortype> as <alias> : else: finally: ...
分类:编程语言   时间:2021-01-26 11:38:53    阅读次数:0
Spark实战(三)本地连接远程Spark(Python环境)
一、Python环境准备 远程服务器上Python版本要与本地想匹配,这里本地使用Anaconda来进行安装,远程服务器之间安装。 wget --no-check-certificate https://www.python.org/ftp/python/3.6.7/Python-3.6.7.tgz ...
分类:编程语言   时间:2021-01-25 11:30:39    阅读次数:0
LeetCode | 0563. 二叉树的坡度【Python】
Problem LeetCode Given the root of a binary tree, return the sum of every tree node's tilt. The tilt of a tree node is the absolute difference between ...
分类:编程语言   时间:2021-01-25 11:29:21    阅读次数:0
linux里python2改python3
感谢作者> https://www.cnblogs.com/botoo/p/11762045.html CentOS7中自带的python版本是python-2.7.5,由于新开的虚拟机需要使用python3,于是便升级一下版本。 安装Python3.7.3 官网下载地址:https://www.p ...
分类:编程语言   时间:2021-01-25 11:22:41    阅读次数:0
「Python」- 代码片段 @20210123
作为一个Python菜鸡,有些常用的代码和方法还是要整理一下的: #!python3 ########################################################################################################### ...
分类:编程语言   时间:2021-01-25 11:18:58    阅读次数:0
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!