1、env_dict.keys(): 获取字段所有的键,比对字符是否有里面的键
env_key=9
env_dict = {"1": "dev", "2": "test", "3": "staging"}
if env_key not in env_dict.keys():
raise Exception("env参数错误", env_key)
标签:学到,env,python,平台,keys,dict,key From: https://www.cnblogs.com/kaibindirver/p/16783146.html