Why Python?
Most OGs use C++, but why I want to use Python?
The reasons are simple:
Built in functions - A lot of functions which we are going to use tons of times are already there to use it, no need reinventing the wheels.
Saves time - For C++, most of the code requires writing the loops or moving pointers around, meanwhile Python are renowned as quick building time.
saving large int hassle - C++, Java, C etc requires a special way to store those large integers, meanwhile python don't need those requirements.
Combine with ML/DL learning - Just my personal preference, as I do machine learning / deep learning related projects, which also heavily uses python.
Meanwhile, most of the legends would prefer using C++ instead. Here's why:
Quick compile and execute time - Python is notoriously bad when it comes to taking the time executing the large inputs / time complexity.
Memory management - Although in low difficulty contests it doesn't matter, but for harder data structure requirements, C++ can have more recursion times / larger size of 2D array / deeper complex tree etc, if compared to Python. And during competition, those are considered the winning factor.
Ready-made data structures - C++ has all the data structure libraries ready (queue, stack, linked list, etc), meanwhile for python, had to code those by hand.
One library to import everything - <bits/stdc++.h>. That's it for C++.
Conclusion: For lower contest, Python probably have advantages when it comes to speed coding; meanwhile for higher contest and harder, complex questions, C++ wins out by memory management and faster execute time.
Last updated