标签:ar io os sp on div art bs ad
Python中assert用来判断语句的真假,如果为假的话将触发AssertionError错误
如:
>>> a = 23
>>> a
23
>>> assert a == 23
>>> a -=1
>>> a
22
>>> assert a == 23
Traceback (most recent call last):
File "", line 1, in
assert a ==
23
AssertionError
>>>
标签:ar io os sp on div art bs ad
原文地址:http://www.cnblogs.com/jane0912/p/4167737.html