patientsList=[['sagar','9856782311'],['mahsh','7865423158']]
patient=['mahsh','7865423158']
search=input("Enter mobile number of patient to search")
for i in patientsList:
for j in patient:
if search==patientsList[i][j]:
print("required patient is")
print(patient)
print( "is Appointed")
break
else:
print("Not appointed")
我需要检查搜索元素是否存在于列表中,但我无法将“搜索”与列表元素进行比较,
搜索是用户输入的手机号码进行搜索