Simple Binary code with Python