-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfile_handling_in_python.py
More file actions
39 lines (38 loc) · 973 Bytes
/
file_handling_in_python.py
File metadata and controls
39 lines (38 loc) · 973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#read and read puls r+
#f1=open("avinash", "r+")
#print(f1.tell())
#f1.write("hi, welcome to jenny letcures")
#f1.write("hi")
#print(f1.tell())
#print(f1.read())
#print(f1.tell())
#f1.close()
#write and write puls w+
#with open("avinash", "w+") as f1:
#print(f1.tell())
#f1.write("hi welcome to india\n")
#print(f1.tell())
#f1.write("welcome to tamilnadu last tip of india where no hindi speaking poeple are avaible ")
#print(f1.tell())
#f1.seek(0)
#print(f1.tell())
#data=f1.read()
#print(f1.tell())
#print(data)
#f1.close()
#append and append puls (+),a+
#with open ("avinash","a+") as f1:
#print(f1.tell())
#f1.seek(0)
#f1.write("i wanna have pizza")
#f1.seek(0)
#print(f1.tell())
#data=f1.read()
#print(f1.tell())
#print(data)
#with open("img.jpg","rb") as f:
#with open("img_1.jpg","wb")as f1:
#print(f1.format)
#for i in f:
# f1.write(i)
#print(f.read())