---
description: Most OGs use C++, but why I want to use Python?
---

# Why Python?

The reasons are simple:

1. 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.
2. Saves time - For C++, most of the code requires writing the loops or moving pointers around, meanwhile Python are renowned as quick building time.&#x20;
3. saving large int hassle - C++, Java, C etc requires a special way to store those large integers, meanwhile python don't need those requirements.
4. 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:

1. Quick compile and execute time - Python is notoriously bad when it comes to taking the time executing the large inputs / time complexity.&#x20;
2. 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.
3. 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.
4. One library to import everything - [\<bits/stdc++.h>](https://www.geeksforgeeks.org/bitsstdc-h-c/). 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.
