I think this works well: my_env = os.getenv("ENV_VAR", 'False').lower() in ('true', '1', 't'). It allows: things like true , True , TRUE , 1 ...
確定! 回上一頁