python 判断字符串中是否包含IPV6地址

2025-04-13 19:12:02
推荐回答(1个)
回答1:

可以用字符串的方法.isalpha()判断字符串是否全部是英文字母,包含大小写,不包含数字和空格
s = 'Hello there'
for i in s.split(' '):
print i.isalpha()