Q4
What is a dictionary and why is it heavily used in DevOps?
💬Answer
A Dictionary stores data in key-value pairs. Since most cloud infrastructure APIs (AWS, GCP, Kubernetes) return responses in JSON format, Python dictionaries are the native structure used to parse, manipulate, and generate configuration parameters.
server = {
"name": "web-server",
"ip": "10.0.0.1"
}
print(server["ip"])
Related Python Questions
View All PythonQuestions →
Created by
Apurv Gujjar
DevOps & Cloud Engineer
Specialized in:DevOpsAWSGCPKubernetesTerraformDocker
View Portfolio