PASS顾名思义,就是跳过它,不进行任何的操作。When a statement is required syntactically but the program requires no action.用法如下

第一种:可用在循环中。注意这是个死循环。

1)

Python中pass的用法

Python中pass的用法

2)

Python中pass的用法

Python中pass的用法

第二种  用在Class类中。Creating minimal classes.

第三种 用在Function函数中。As a place-holder for you to keep thinking and work later, and can be silently ignored.But remember to implement it later.

Python中pass的用法

相关文章:

  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
  • 2022-02-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2021-04-29
  • 2022-12-23
相关资源
相似解决方案