会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
测试小白
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
2019年10月19日
处理异常 ‘try’——‘except’ 方法
摘要: try: name 2+'3' [][3] {}['k'] ret = int(input('number>>>')) print(ret*'*')except ValueError: print('输入的数据有误')except Exception: print('你错了,老铁')else: pr
阅读全文
posted @ 2019-10-19 23:30 Test-Billy
阅读(4557)
评论(0)
推荐(0)
编辑
2019年10月15日
python -生成随机的验证码
摘要: import randomdef v_code(): code= '' for i in range(5): num = random.randint(0,9) #随机生成0到9的整数 alf = chr(random.randint(65,90)) #根据 ascii码,随机生成字母 add =
阅读全文
posted @ 2019-10-15 14:54 Test-Billy
阅读(373)
评论(0)
推荐(0)
编辑
上一页
1
2
3