databese = [12, 'bob', 56, 'fox', 90, 101, 158]a = int(input('Plese enter one number:'))b = str(input('Plese enter other name:'))if a in databese: print('a输入正确')else: print('a输入不正确')if b in databese: print('b输入正确')else: print('b输入不正确')if [a, b] in databese: print('a和b都输入正确')else: print('a,b都或其中一个不在列表中')# 输入 12 ,bob ,分开判断时,结果都对,但是 两个在一起判断就会出错,求大神解答(备注:python3)
添加回答
举报
0/150
提交
取消