我需要进行错误检查以确保用户输入有两位小数。
我怎样才能做到这一点?
我最终做了这样的事情:
if len(input) > 3:
if input[-3] == ".":
#then the validation of the varriable
我需要进行错误检查以确保用户输入有两位小数。
我怎样才能做到这一点?
我最终做了这样的事情:
if len(input) > 3:
if input[-3] == ".":
#then the validation of the varriable