摘要: # py4测试题 # 1、8 3]*2+1)).center(7, ' ') for i in range(7)])) print('\n') #方法二: def draw(n): def paint(i,n): s,l = divmod(i,2) print(('%s%s%s'%('*' * s,'*' * l,'*' * s)).center(n)... 阅读全文
posted @ 2017-04-24 20:03 ForeverPine 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 一、isinstance(obj,cls)和issubclass(sub,super) isinstance(obj,cls)检查是否obj是否是类 cls 的对象 issubclass(sub, super)检查sub类是否是 super 类的派生类 二、反射 1 定义:主要指程序可以访问、监测和 阅读全文
posted @ 2017-04-24 17:43 ForeverPine 阅读(679) 评论(0) 推荐(0) 编辑
TOP