热门

最新

红包

立Flag

投票

同城

我的

发布
sunhuaqiang1
No Silver Bullet 前端领域优质创作者
4 年前
truesunhuaqiang1

今日热议
南京市夫子庙街道
CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
def integer(str_x): for j in str_x: if j not in '0123456789': return False return True str_ip = input().split('.') A = str_ip[0] B = str_ip[1] C = str_ip[2] D = str_ip[3] if integer(A) and integer(B) and integer(C) and integer(D): if 0 <= int(integer(A)) <= 255 and 0 <= int(integer(B)) <= 255 and 0 <= int(integer(C)) <= 255 and 0 <= int(integer(D)) <= 255: print('Yes') else: print('No')为什么输入25555也会输出yes?😳😳
立即登录