python 的 str 函数挺方便的,楼主 T = int(sys.stdin.readline().strip()) data = [] for _ in range(T): data.append(sys.stdin.readline().strip()) for s in data: if not (s[0].isupper()&nbs***bsp;s[0].islower() ): print("Wrong") elif not s.isalnum(): print("Wrong") elif s.isalpha()&nbs***bsp;s.isnumeric(): print("Wrong") else: print("Accept")