Either one will work fine.
Python is popular because it has many ML libraries included. It's also popular just because it's easy to use. If you are absolutely concerned with performance then C++ is the choice. C++ also has a number of ML libraries that can be acquired..