2019-06-25
阅读量:
420
如何在python中编写空函数
在Python中,要编写空函数,我们使用pass语句。pass是Python中的一个特殊语句,它什么都不做。它只能作为虚拟语句。
# Correct way of writing empty function
# in Python
def fun():
pass
我们也可以在空语句中使用pass。
# Empty loop in Python
mutex = True
while (mutex == True) :
pass






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
0条评论