DevOps is usually more backend or full stack (though in bigger companies it’s its own job entirely).
Python is always a good start in that regard. But honestly, the basics for programming are pretty much the same across languages (with a few exceptions). So you could go with JavaScript, C#, Python, … whatever beginner friendly language you prefer.
Personally for a learning language and if you’re using Windows I’d lean towards C# (With Visual Studio Community, it’s free). It does give you a good idea of what data types, classes, etc. are and if you want to dive deeper you can transition to C++ afterwards to learn about memory management and pointers (but it’s not a fun language to work with, in my personal opinion).