python教程

时间:2026年06月21日 10:06:29

Python3 基本数据类型 | 菜鸟教程

#!/usr/bin/python3.Python3 基本数据类型 Python 中的变量不需要声明。每个变量在使用前都必须赋值,变量赋值以后该变量才会被创建。 在 Python 中,变量就是变量,它没有类...

Python random() 函数 | 菜鸟教程

#!/usr/bin/python# -*- coding: UTF-8 -*-importrandom# 生成第一个随机数print random() : ,random.random()# 生成第二个随机数print random() : ,random.random().#!/us...

Python pass 语句 | 菜鸟教程

#!/usr/bin/python# -*- coding: UTF-8 -*-# 输出 Python 的每个字母forletterin'Python':ifletter=='h':passprint'这是 pass 块'print...