C++'s advantage in comparison with Python doesn't lie in operations constrained by the OS such as printing to the console, but rather:
- The fact is it hard typed, thus minimizing run-time overhead due to dynamic typing and type safety
- The fact C++ is compiled (and highly optimized) and Python is (mostly) interpreted
- In it's memory management model (Python uses managed objects that require garbage collection)
- C++ can give you more control when implementing performance critical code (as far as using assembly and taking advantage of specific hardware)