标签:python
断言
>>> assert 3 < 4 #assert 断言,当关键字后面条件为假的时候,程序自动崩溃并抛出AssertionError异常
>>> assert 3 > 4
Traceback (most recent call last):
File "<pyshell#8>", line 1, in <module>
assert 3 > 4
AssertionError
本文出自 “每天进步一点点” 博客,请务必保留此出处http://zuoshou.blog.51cto.com/2579903/1980719
标签:python
原文地址:http://zuoshou.blog.51cto.com/2579903/1980719