Read a file character by character/UTF8: Difference between revisions
Content added Content deleted
(→{{header|Python}}: Added Python 3 version) |
(→{{header|Python}}: Python 2 is incorrect) |
||
Line 323: | Line 323: | ||
=={{header|Python}}== |
=={{header|Python}}== |
||
{{works with|Python|2.7}} |
{{works with|Python|2.7}} |
||
{{incorrect|PYthon|It reads the file byte by byte not character by character.}} |
|||
<lang python> |
<lang python> |
||
with open(filename,"rb") as f: |
with open(filename,"rb") as f: |