python 断言
摘要:
# -*- coding: utf-8 -*- ''' 断言可以判断一个变量是否是指定的数据类型,如果不是指定的数据类型就会报错 ''' aa = "asd" bb = 12 #使用断言 assert type(aa) is str print(aa) assert type(bb) is str print(bb) 阅读全文
posted @ 2017-12-04 10:10
gaizhongfeng
阅读(165)
评论(0)
推荐(0)
浙公网安备 33010602011771号