30种常用的Python实现

作者: 妄心xyx | 来源:发表于2019-01-06 11:23 被阅读261次

1、冒泡排序

Python实现方法大集合,这些你都玩过吗?

2、计算x的n次方的方法

Python实现方法大集合,这些你都玩过吗?

3、计算aa + bb + c*c + ……

Python实现方法大集合,这些你都玩过吗?

4、计算阶乘 n!

Python实现方法大集合,这些你都玩过吗? Python实现方法大集合,这些你都玩过吗? Python实现方法大集合,这些你都玩过吗?

5、列出当前目录下的所有文件和目录名

Python实现方法大集合,这些你都玩过吗?

6、把一个list中所有的字符串变成小写:

Python实现方法大集合,这些你都玩过吗?

7、输出某个路径下的所有文件和文件夹的路径

Python实现方法大集合,这些你都玩过吗?

8、输出某个路径及其子目录下的所有文件路径

Python实现方法大集合,这些你都玩过吗?

9、输出某个路径及其子目录下所有以.html为后缀的文件

Python实现方法大集合,这些你都玩过吗? Python实现方法大集合,这些你都玩过吗?

10、把原字典的键值对颠倒并生产新的字典

Python实现方法大集合,这些你都玩过吗? Python实现方法大集合,这些你都玩过吗?

11、打印九九乘法表

Python实现方法大集合,这些你都玩过吗?

通过指定end参数的值,可以取消在末尾输出回车符,实现不换行。

12、替换列表中所有的3为3a

Python实现方法大集合,这些你都玩过吗?

13、打印每个名字

Python实现方法大集合,这些你都玩过吗?

** 善于使用 rang() ,会使问题变得简单

14、合并去重

Python实现方法大集合,这些你都玩过吗?

15、随机生成验证码的两种方式

Python实现方法大集合,这些你都玩过吗? Python实现方法大集合,这些你都玩过吗? Python实现方法大集合,这些你都玩过吗? Python实现方法大集合,这些你都玩过吗?

16、计算平方根

Python实现方法大集合,这些你都玩过吗?

17、判断字符串是否只由数字组成

Python实现方法大集合,这些你都玩过吗? Python实现方法大集合,这些你都玩过吗?

18、判断奇偶数

Python实现方法大集合,这些你都玩过吗? Python实现方法大集合,这些你都玩过吗?

19、判断闰年

Python实现方法大集合,这些你都玩过吗? Python实现方法大集合,这些你都玩过吗? Python实现方法大集合,这些你都玩过吗?

20、获取最大值

Python实现方法大集合,这些你都玩过吗? Python实现方法大集合,这些你都玩过吗?

21、斐波那契数列

斐波那契数列指的是这样一个数列 0, 1, 1, 2, 3, 5, 8, 13;特别指出:第0项是0,第1项是第一个1。从第三项开始,每一项都等于前两项之和。

Python实现方法大集合,这些你都玩过吗?

22、十进制转二进制、八进制、十六进制

Python实现方法大集合,这些你都玩过吗?

23、最大公约数

Python实现方法大集合,这些你都玩过吗?

23、最小公倍数

Python实现方法大集合,这些你都玩过吗?

24、简单计算器

Python实现方法大集合,这些你都玩过吗?

25、生成日历

Python实现方法大集合,这些你都玩过吗?

26、文件IO

Python实现方法大集合,这些你都玩过吗?

27、字符串判断

Python实现方法大集合,这些你都玩过吗?

28、字符串大小写转换

Python实现方法大集合,这些你都玩过吗?

29、计算每个月天数

Python实现方法大集合,这些你都玩过吗?

30、获取昨天的日期

Python实现方法大集合,这些你都玩过吗?

相关文章

  • python爬虫记录

    爬虫是比较常用的程序,用python实现起来非常简单,有几个相关的库,这里就记录一下python常用的爬虫代码,备...

  • python

    1)Python实现EXCEL常用操作——pandas简介 2)python-安装第三方包 3)python可视化...

  • python替代excel

    前言: excel能干的,python也可以。本文 python实现了几种常用的excel操作,并且这些一旦完成,...

  • 【Python入门必看】——30个python的常用案例

    30个常用python实现是一套python入门教程,包含新手必备的Python三十个常见的脚本汇总,包括冒泡算法...

  • tensorflow 教程总结

    TensorFlow常用函数 tensorflow搭建简单神经网络 | Python tflearn 实现vgg1...

  • 2017.6.13-14

    学习python总结python常用的方法string的常用方法dictionary的常用方法 python抽象,...

  • python 排序算法

    文章概述 介绍各大常用经典的排序算法和效率,以及python实现常用算法(冒泡排序,选择排序,快速排序,插入排序)...

  • python函数

    使用 explode 实现 pandas 列转行的 2 个常用技巧 Python中的map()、apply()和a...

  • Python常用模块

    Python常用模块之time模块 Python常用模块之os模块 Python常用模块之sys模块 Python...

  • 数据存储之python下excel的写入和读取(三)

    数据存储之python下excel的保存和读取(三) excel常用的处理表格类数据的工具。python下可实现e...

网友评论

    本文标题:30种常用的Python实现

    本文链接:https://www.haomeiwen.com/subject/texsrqtx.html