'{:08b}' .format(i) Equivalent in Python 2.x

Viewed 3494

I have a small bit of code in Python 3 -

'{:08b}' .format(i)

that gives an error in Python 2.x. Does anyone know the equivalent?

2 Answers
Related