python多组读入
Posted goto_1600
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python多组读入相关的知识,希望对你有一定的参考价值。
import sys
try:
while True:
alpha=["A","H","I","M","O","T","T","U","V","W","X","Y"]
s = sys.stdin.readline().strip()
if s == '':
break
T = ""
flag = True
for i in range(len(s) - 1, -1, -1):
T += s[i]
if (s[i] not in alpha):
flag = False
break
if (T == s and flag):
print("YES")
else:
print("NO")
except:
pass
以上是关于python多组读入的主要内容,如果未能解决你的问题,请参考以下文章