Pythonpass语句
来源:动视网
责编:小采
时间:2020-11-27 14:27:48
Pythonpass语句
Pythonpass语句:Python pass是空语句,是为了保持程序结构的完整性。Python 语言 pass 语句语法格式如下:pass 实例:#!/usr/bin/python for letter in 'Python': if letter == 'h': pass print 'This is p
导读Pythonpass语句:Python pass是空语句,是为了保持程序结构的完整性。Python 语言 pass 语句语法格式如下:pass 实例:#!/usr/bin/python for letter in 'Python': if letter == 'h': pass print 'This is p

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!
Pythonpass语句
Pythonpass语句:Python pass是空语句,是为了保持程序结构的完整性。Python 语言 pass 语句语法格式如下:pass 实例:#!/usr/bin/python for letter in 'Python': if letter == 'h': pass print 'This is p