摘要: 不使用正则表达式的方式: def is_ip(ip: str) -> bool: return True if [True] * 4 == [x.isdigit() and 0 <= int(x) <= 255 for x in ip.split(".")] else False 使用正则表达式的方 阅读全文
posted @ 2020-06-02 15:57 hchan 阅读(327) 评论(0) 推荐(0)