convert integer to a string in a given numeric base in python
- by Mark Borgerding
Python allows easy creation of an integer from a string of a given base via
int(str,base).
I want to perform the inverse: creation of a string from an integer.
i.e. I want some function int2base(num,base)
such that:
int( int2base( X , BASE ) , BASE ) == X
the function name/argument order is unimportant
For any number X and base BASE…