这是我的错误: 回溯(最近一次调用最后一次): 文件“C:/Users/Admin/AppData/Local/Programs/Python/Python312/code6.py”,第 6 行,位于 如果年龄 < 18: TypeError: '<' not supported between instances of 'str' and 'int'
< operator should be applied to either two strings or two integers, so you should cast
age
变量转换为整数:int(age) < 18
。