Python学习笔记(十三)----Python pass语句
2013-12-23 23:00
411 查看
Python pass是空语句,是为了保持程序结构的完整性。
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 语言 pass 语句语法格式
pass二、实例
#!/usr/bin/pythonfor 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 pass 语句
- Python学习笔记(七)----Python 循环语句
- python pass (空操作)语句
- Python pass 语句使用示例
- python 试题:Python中pass语句的作用是什么?
- python pass语句的作用
- Python学习之[5]——pass语句
- Python pass 语句
- python中pass语句
- Python pass 语句
- Python pass 语句
- Python 的 pass 语句
- Python新路程(8)Python pass 语句
- Python基础————13、pass语句
- Python中pass语句的作用
- python break,pass,continue 循环语句
- python pass 空语句 do nothing
- Python类里的pass语句
- Python中的pass语句使用方法讲解
- Python break continue pass语句day06