摘要: 1.用算法判断某⼀一个字符串串是否是⼩小数s17 = "-123.12"s17 = s17.replace("-", "") #替换掉负号if s17.isdigit(): print("是整数")else: if s17.count(".") == 1 and not s17.startswith(".") and not s17.endswith("."): prin... 阅读全文
posted @ 2019-01-03 17:51 芒果侠 阅读(146) 评论(0) 推荐(0) 编辑