标签:import 字符 print not style nbsp imp lse col
#!/usr/bin/python3 # -*- coding: utf-8 -*- import re ip = "192.168.1.1" ip = re.findall("^(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|[1-9])\.(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)$", ip) print(ip) if not ip: print("no") else: print("yes")
标签:import 字符 print not style nbsp imp lse col
原文地址:https://www.cnblogs.com/37yan/p/10303724.html