Skip to content

Commit 2ac8dd6

Browse files
Handling of binary data in file Handling.
1 parent 8f99bc3 commit 2ac8dd6

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

FileHandling7.py

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#Handling the binary data in file
2+
3+
f1=open('image1.jpg','rb')
4+
f2=open('newImage1.jpg','wb')
5+
databytes=f1.read()
6+
print("Reading of Binary file completes...")
7+
f2.write(databytes)
8+
print("writing of Binary file completes...")
9+

image1.jpg

87.9 KB
Loading

newImage1.jpg

87.9 KB
Loading

0 commit comments

Comments
 (0)