Worried with Python as my main language

Hi , I have started competitive coding recently and use python as my language to solve any problem
when i first was confronted by a TLE i got to know that nobody actually uses python to code in cp so i am getting worried to shift to different language as i am comfortable with python?
please suggest me that can i use python as my main language or shift to c++14

C++ is a great language for competitive programming because of its fast speed, memory management, pointerss etc. Moreover C++ has STL(Standard Temporary Library) which has a great collection of data structures and algorithms and makes many algorithm easier to code. Python is a scripting language, though you can use it for CP(due to its abstract libraries). But python isn’t allowed in many CP competitions like IOI. I suggest you shift to C++ in the beginning only as you would be comfortable later. My experience with c++ is great.

3 Likes

If you want to try new programming language then Rust is also nowadays getting popularity. It is a memory-safe language and it got the tone of new features that can outrank C++.

Competitive with C++ is the best thing it is not a problem if you are not using CPP in contests and choosing python over it ! But You should atleast know the C++ Syntax ! Almost every educational blog related to algo/ ds are in C/ C++ ! Implementations of many complex algos can not be found for python 3 but is a search away for cpp

1 Like

Yes and sometimes the same implementation in python can give u TLE , and when u get to know that the same approach in cpp got AC ,“dil se bura lgta h bhai”

2 Likes

such me dil se bura lgta ha bhai ! I was into Cp and some day later I came to know sometimes Solutions submitted on Python 3 give TLE but PyPy 3 does not :frowning:

1 Like

Just use Fast IO and PyPy3 to submit, you’ll be fine for most problems.

2 Likes

It is difficult to keep track of you memory usage and time in Python. I myself started with Python, but got to know that cpp is the thing to go for. You can start learning cpp from YouTube from channels like Bucky or join Fork CPP on GFG.