Daily Archives: 2008年8月4日

Python: 10進数整数を2進数文字列に変換する関数

2進数文字列を10進数整数に変換する関数int()はありますが、 >>> int(’1011′, 2) 11 その逆の、10進数整数を2進数文字列に変換する関数が(Python2.5では)見当たらなかったので、書いてみま … Continue reading

Posted in Python | Tagged , , , , | Leave a comment