Create a dictionary called server with keys 'host', 'port', and 'status' mapped to 'web-01.prod', 80
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
Problem
Create a dictionary called server with keys 'host', 'port', and 'status' mapped to 'web-01.prod', 8080, and 'running'. Print the host, then the status. Then use .get() to print a 'region' key with default 'us-east-1'.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.