200-901 · Question #277
Refer to the exhibit. Which line must be included in the Bash script for the Python code to succeed?
The correct answer is B. export WEBEX_TEAMS_ACCESS_TOKEN=your_access_token_here. In Bash, export WEBEX_TEAMS_ACCESS_TOKEN=your_access_token_here both assigns the variable and exports it to the environment, making it available to child processes - including any Python script invoked from the Bash script. Python's os.environ.get('WEBEX_TEAMS_ACCESS_TOKEN')…
Question
Refer to the exhibit. Which line must be included in the Bash script for the Python code to succeed?
Exhibit
Options
- Adefine WEBEX_TEAMS_ACCESS_TOKEN=your_access_token_here
- Bexport WEBEX_TEAMS_ACCESS_TOKEN=your_access_token_here
- Cset WEBEX_TEAMS_ACCESS_TOKEN=your_access_token_here
- DWEBEX_TEAMS_ACCESS_TOKEN=your_access_token_here
How the community answered
(17 responses)- A6% (1)
- B88% (15)
- D6% (1)
Explanation
In Bash, export WEBEX_TEAMS_ACCESS_TOKEN=your_access_token_here both assigns the variable and exports it to the environment, making it available to child processes - including any Python script invoked from the Bash script. Python's os.environ.get('WEBEX_TEAMS_ACCESS_TOKEN') reads from the process environment, so the variable must be exported. Simply assigning WEBEX_TEAMS_ACCESS_TOKEN=value (Option D) without export creates a shell-local variable not visible to child processes. define (Option A) is not valid Bash syntax. set (Option C) is a Windows CMD/PowerShell syntax, not Bash.
Topics
Community Discussion
No community discussion yet for this question.
