Udacity learning is project-based, and the projects are designed in Python and C++. It’s kind of like a college course. In theory, you can learn algorithms and data structures in any language. But, in practice, whatever course you take will choose a specific language.
Also, to be hired into the self-driving car industry, it’s almost a requirement to be familiar with C++, and to a lesser extent, Python.