Maybe do `DESIRED_CAPABILITIES.get(os.environ.get('SAUCE_BROWSER', 'chrome').lower()),` ? Although that's getting to be too much logic in one line, and should be split into two lines.