How to use internal python c funtions, from python code

Chris Angelico rosuav at gmail.com
Wed Dec 9 23:53:48 EST 2015


On Thu, Dec 10, 2015 at 3:44 PM, srinivas devaki
<mr.eightnoteight at gmail.com> wrote:
> For competitive programming purposes I really want to use those functions
> for speed.

Recommendation: Write your code the simple and obvious way, and *then*
start thinking about speed. And before you look at calling on C code
manually, try running your code in PyPy, and then try making use of
Cython.

For the specific example of converting an integer into a string using
a particular base, there are quite a few options available; but I
would recommend using the very simplest you can get away with.

ChrisA



More information about the Python-list mailing list