<span class="gmail_quote">22 Oct 2006 06:33:50 -0700, Lucas <<a href="mailto:Luwian@gmail.com">Luwian@gmail.com</a>>:</span><br><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I known how to do it.<br>read() return a string. so<br>1) bytes = read(1) #read the file by bit.<br>2) chrString = ord(bytes) #convert the string to ASCII.<br>3) print numberToBinary(chrString) #convert the ASCII to Binary using
<br>my function.<br>4) Loop</blockquote><div><br>[numberToBinary(ord(x)) for x in f.read()] ?</div></div><br>-- <br>Felipe.