大家可以看看这个缩写判断该如何处理吗
#*coding:utf-8__*__
n_num=int(input())
result=[]
ss=””
while n_num:
n_num-=1
wen=input().split()
for i in range(len(wen)):
ss+=wen[i][0]
ss.upper()
result.append(ss)
if result[0]==result[-1]:
print(“Same”)
else:
print(“Different”)
Example Code
or, you can do it by