To understand the answer to this questionwe need first know some concepts and ideas about it:

What is Python?

“Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built-in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components. Python’s simple, easy-to-learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python supports modules and packages, which encourages program modularity and code reuse. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms and can be freely distributed” From www.python.org

In simple words we could say, Python is a very powerful, simple, and easy-to-learn programming language.


Python extra2
Python extra

Why Python is so popular?

With its characteristics (powerful, simple, and easy to learn) is impossible that Python does not become one of the most popular programming languages these days. The simplicity of the code and the big availability of packages or libraries, does Python the first election when we talk automation and scripting.

To demonstrate how simple Python code is, in the image we have a comparison between Java and Python.

Booth codes are doing the same, printing a console output with the text “Hello World”

What kind of tasks are doing in Python as an SRE/DevOps Engineer?

Exist a lot of tasks and situations where you could use Python, some examples are:

More python2

In conclusion

The advantages of learning Python as a DevOps or SRE engineer are enormous. You could automate tasks, integrate different tools, and create your tools. As DevOps /SRE Engineer one of your main responsibilities is to integrate tools into the workflow of the existing ones. Of course, other languages are very popular today, like go or the classic Bash.