python基础学习

编程知识 行业动态 更新时间:2024-06-13 00:18:15

Python 基础教程

Python 基础教程 Python 简介 Python 环境搭建 Python 中文编码 Python 基础语法 Python 变量类型 Python 运算符 Python 条件语句 Python 循环语句 Python While循环语句 Python for 循环语句 Python 循环嵌套 Python break 语句 Python continue 语句 Python pass 语句 Python 数字 Python 字符串 Python 列表(Lists) Python 元组 Python 字典(Dictionary) Python 日期和时间 Python 函数 Python 模块 Python 文件I/O Python 异常处理

Python 高级教程

Python 面向对象 Python正则表达式 Python CGI编程 python操作mysql数据库 Python使用SMTP发送邮件 Python 多线程 Python XML解析 python GUI编程(Tkinter) Python2.x与3​​.x版本区别 Python IDE Python JSON   « Python continue 语句 Python 数字 »

Python pass 语句

Python pass是空语句,是为了保持程序结构的完整性。

Python 语言 pass 语句语法格式如下:

pass

实例:

#!/usr/bin/python

for letter in ‘Python’:
if letter == ‘h’:
pass
print ‘This is pass block’
print ‘Current Letter :’, letter

print “Good bye!”

以上实例执行结果:

Current Letter : P
Current Letter : y
Current Letter : t
This is pass block
Current Letter : h
Current Letter : o
Current Letter : n
Good bye!
« Python continue 语句 Python 数字 »

更多推荐

python基础学习

本文发布于:2023-03-26 12:19:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/60c8253339a5a04a53eb81ef043b47e6.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:基础   python

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!