2019年4月25日

摘要: # --*-- coding: utf-8 --*--# create by xiaocaiji#异常处理父类会覆盖子类,多层嵌套错误也能检测#格式中else也可以换成finally,意味无论前面有没有错误,finally中语句都要执行,常用语文件操作'''格式1:try: passecpect N 阅读全文
posted @ 2019-04-25 17:06 泡面小网管 阅读(137) 评论(0) 推荐(0)
摘要: # --*-- coding: utf-8 --*--# create by xiaocaiji#偏函数 把一个参数固定住,形成一个新的函数import functoolsprint(int('1010',base=10))int = functools.partial(int,base=2) #生 阅读全文
posted @ 2019-04-25 15:34 泡面小网管 阅读(115) 评论(0) 推荐(0)
摘要: # --*-- coding: utf-8 --*--# create by xiaocaijiwhile 1: str_ip = input("input a IP:") list_ip = str_ip.split('.') if len(list_ip) < 4: print("error I 阅读全文
posted @ 2019-04-25 09:09 泡面小网管 阅读(1763) 评论(0) 推荐(0)

导航