Skip to content
KerwinKoo edited this page Dec 26, 2015 · 1 revision

python assert 用法

assert 语句用来声明某个条件是真的。当assert语句失败的时候,会引发 AssertionError

可以用 try: except过滤。

[[TOC]]

Clone this wiki locally