positive: "1.is来判断<br>groupName = params['groupName'] ##groupName的值是'url' reqBody['dim'] = groupName print(""reqBody_dim-SummaryListHandler"", reqBody['dim']) ## ('reqBody_dim-SummaryListHandler', u'url') print(""reqBody_dim_url-SummaryListHandler"", ('url' is reqBody['dim'])) ## ('reqBody_dim_url-SummaryListHandler', False) if groupName is 'url': 打印如下,看到通过is判断是false ('reqBody_dim-SummaryListHandler', u'url') ('reqBody_dim_url-SummaryListHandler', False)<br>2.id 和in<br>看到用in可以判断两个字符串相等<br>print(""groupName:"",groupName) reqBody['dim'] = groupName print(""reqBody_dim-SummaryListHandler"", reqBody['dim']) print(""reqBody_dim_url_is-SummaryListHandler"", ('url' is groupName)) print(""reqBody_dim_url_id-SummaryListHandler"", (id('url')==id(groupName))) print(""reqBody_dim_url_in-SummaryListHandler"", ('url' in groupName)) ('groupName:', u'url') ('reqBody_dim-SummaryListHandler', u'url') ('reqBody_dim_url_is-SummaryListHandler', False) ('reqBody_dim_url_id-SummaryListHandler', False) ('reqBody_dim_url_in-SummaryLis"
negative: 您好那么胃痛主要和喝酒,吃辛辣的饮食,不洁饮食,暴饮暴食等有关系如果平时就有胃炎的情况,那么还应该饮食规律,少吃多餐,多吃蔬菜水果多喝水,少吃生冷硬辛辣的饮食