Python3购物车的一些随笔(1)

购物车要求:启动程序后,让用户输入金额
>>> user_money = input("please input your money:")
please input your money:100000000
>>> user_money
'100000000'   # 数字是带引号的,但是它可以被识别为数字
>>> user_money.isdigit()
True
>>> print(int(user_money))
100000000

猜你喜欢

转载自www.cnblogs.com/gepu1991/p/9119640.html