|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
str1 = '''那个文本放进去'''
list1 = list(str1)
list1.append('a')
list2 = []
lenth = len(list1)
for i in range(0,lenth-5):
n = str(list1[i])
a1 = str(str1[i-1])
a2 = str(str1[i-2])
a3 = str(str1[i-3])
a4 = str(str1[i+1])
a5 = str(str1[i+2])
a6 = str(str1[i+3])
a7 = str(str1[i+4])
a8 = str(str1[i-4])
if n.islower():
if a1.isupper() and a2.isupper() and a3.isupper() and a4.isupper() and a5.isupper() and a6.isupper() and a7.islower() and a8.islower():
list2.append(list1[i])
frist = ''
for j in list2:
frist = frist + j
print(frist) |
|