摘要:
def ip_fun(ip_str: str): ip_list = ip_str.split(".") flag = True for ip in ip_list: if ip.isdigit() and len(ip_list) == 4 and 0 <= int(ip) <= 255: con 阅读全文
摘要:
# 递归去除空格 def trip_str(s): if s[0] == ' ': return trip_str(s[1:]) elif s[-1] == " ": return trip_str(s[:-1]) else: return s print(trip_str("a b ")) pri 阅读全文