T='12a34b56c' for i in T: if i == 'a': print(i,'年') elif i == 'b': print(i,'月') elif i == 'c': print(i,'日') else: digit=eval(i) print(i,"奇数") if digit in [1,3,5,7,9] else print(i,"偶数") # 将中间2个elif改为if会提示SyntaxError: unexpected EOF while parsing错误
MyFray
qq_慕仙8248301