Why is Python the default scripting language in so many DevOps teams, and where would you not use it?
BeginnerConceptLanguage essentials & functions
Answer
Python has first-class SDKs for every cloud and platform (boto3, the Kubernetes client, Docker SDK, Azure and GCP libraries), ships on almost every Linux distro, is readable by people who are not full-time developers, and has a huge standard library for files, JSON, HTTP and processes. Ansible, SaltStack, the AWS CLI v1 and many CNCF tools are written in it.
Where we do not use it: a five-line glue job that is mostly piping commands (Bash is simpler), a small static binary that must run anywhere without a runtime (Go), or a high-throughput Kubernetes controller where Go's client-go and controller-runtime are the mature path.
More on Language essentials & functions
What is the difference between mutable and immutable types? Give examples.BeginnerWhat does assignment do in Python, and how do shallow and deep copies differ?BeginnerExplain the mutable default argument bug and how to fix it.IntermediateWhat is the difference between `==` and `is`?BeginnerWhat values are "falsy" in Python, and why does it matter in scripts?BeginnerWhen do you choose a list, tuple, set or dict?Beginner