收藏文章 楼主

输入字符,执行打印

版块:python3 基础   类型:精华   作者:小绿叶技术博客   查看:3400   回复:0   获赞:5   时间:2018-12-07 11:49:04

while True:

    x = input('please input:')

    try:

        x = int(x)

        print('you have input {0}'.format(x))

        break

    except Exception as e:

        print('error.'  ,e)

提供企业建站服务,免费网防系统,提交信息登录 http://yundun.ddoss.cn 邮箱: proposal@ddoss.cn 
回复列表
默认   热门   正序   倒序

回复:输入字符,执行打印

头像

用户名:

粉丝数:

签名:

资料 关注 好友 消息