read(size=-1)

7stud bbxx789_05ss at yahoo.com
Tue Aug 7 02:06:57 EDT 2007


Suppose I write:

f = open("myimg.jpg")
f.read(10)


According to the docs,
-----------
read([size])

Read at most size bytes from the file....The bytes are returned as a
string object.
----------

How does python convert a byte to a string?




More information about the Python-list mailing list