How I'm learning Python - Stack Overflow
For DevOps, what should you choose between Python and GoLang?
Python is object oriented; Golang is not (but mocks a lot of behaviors and some consider it to be "sorta OO").
Python syntactically is simpler to pick up; but has more complexity to managing the deployment of scripts at scale (dependency management, etc). Python tends to be easier to work with for newer programmers due to the availability of the REPL. Golang is a more verbose syntax but compiles to a single binary for distribution, I find it easier to work with for larger programs that depend on concurrency and projects with a larger scope, and python easier for quick hits. (This is all my personal opinion)
I find more teams (on average) leverage python than go, but thats because "DevOps teams" generally have less programming aptitude (this is not a dig, just a fact due to the breadth of technology). Go tends to be more used if an org is at a maturity level where its building internal tooling / platforms versus glue-scripts and still maturing automation. Note: this is a generalization at best.
Simply put: If new to programming or just looking for the biggest return on your investment: start with Python. If you have coding experience, Python is trivial to pickup so the decision is less important; you already have the core concepts down anyways. What matters is being able to look at code and understand conceptually what's happening, and to be able to dive in and write code as needed (with the help of an ample amount of documentation; you wont always get to pick the language you are thrust into supporting)
More on reddit.comGO recommended over python for devops in 2022?
What do you automate with Python?
We made a tool that automated some regulatory checks on projects in our pipeline (e.g., 'if any project isn't running security scans, ping the team in Slack'), some Lambdas for authentication purposes for a legacy upload system, tests, some scripts to help our Kubernetes servers drain so we could remove old servers without killing pods in the middle of processing (features have since been added to K8s to handle these cases, but it was handy at the time), and a number of other small things. Plus there were a few on-call P0's where the code owner was on vacation, so I fixed the thing instead.
More on reddit.com