why would someone use different programming languages if they know how to do it in one?
why would someone write the majority of a program in C++ and then have a part of it written in Python? what is the advantage?
Ease of writing. Ease of maintenance. Ease of understanding. To take advantage of things that are easy in one language but difficult in another. To take advantage of libraries that exist. Perhaps the compiler or interpreter does not exist on the target platform. Perhaps the compiler or interpreter is better on the target platform. To match the code of an existing codebase. Because the other coders on the team don't understand that language. To meet contractual obligations. Because the resulting executable will be faster. Because the resulting executable will have a smaller memory footprint. The list goes on and on and on.