Python or C

Hey all ,recently I started out my journey in codechef and the thing that struck me the most was that code written in C took very less time to execute.As Iam just a beginner I tend to stick to python while trying and solving problems,as it gives me better concentration on the problem and not on the background procedures for the impelementation, like in C.

Can python be used for all purposes in the near future? I have noticed that there are many supporting projects for python ,to try and port it to differnt platforms.

That being said I feel that C tends to become very complicated at times.Any way I can improve my understanding of C and use it as fluidly as python?
Most of the times I get TLE when I use python for complicated questions.

Python is just great!
That being said, for codechef you HAVE to use compiled/JIT compiled languages not interpreted, for most medium level problems due to very tight bounds.

PS: Unless codechef starts supporting pypy.


it’s partially true. i sometimes have to switch back to plain old C to pass time limits in contests because python is somehow internally too slow. on the other hand, i often saw code of people complaining that python was too slow, and it appears eventually that they did a real mistake in their implementation (misunderstanding of variable scope, wrong variable type, wrong algorithm, and so on… example here). so… i only believe what i see. :slight_smile: though, i agree on the fact that python is very time-sensitive to mistakes. if you do something badly, the interpreter won’t forgive it. :smiley: