添加 py过滤失败

This commit is contained in:
yky 2025-05-19 12:03:54 +08:00
parent ae390a0ea3
commit 45bd47eb58

42
py过滤失败 Normal file
View File

@ -0,0 +1,42 @@
#取出子列表
x, y, z = [
["RE", "DR✍O", "CK{❦"],
["I a", "m le♫a", "rn†‡in"],
["g Py✣✤✥t", "ho⇒⇓⇔⇕na", "t SR々E}"]
]
# 取出x
a1, a2, a3 = x
# 取出y
b1, b2, b3 = y
# 取出z
c1, c2, c3 = z
# 过滤
x1 = ''
for sub_str_list in x: #遍历x中的每个字符串
for char in sub_str_list: #遍历x中的每个字符
if char.isalnum() or char.isspace() or char in '{}':
x1 += char
print(x1)
y1 = ''
for sub_str_list in y:
for char in sub_str_list:
if char.isalnum() or char.isspace() or char in '{}':
y1 += char
print(y1)
z1 = ''
for sub_str_list in z:
for char in sub_str_list:
if char.isalnum() or char.isspace() or char in '{}':
z1 += char
print(z1)
#连接
print(x1+y1+z1)
#输出,未过滤干净