- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFile.py
More file actions
Latest commit
15 lines (15 loc) · 364 Bytes
/
Copy pathFile.py
File metadata and controls
15 lines (15 loc) · 364 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
fp=open("myFile", "w")
print("Writing data to file")
str="Hai welcome to the file handling concepts"
fp.write(str)
fp.close()
fp=open("myFile", "r")
print("Reading data from the file")
str=fp.read()
print(str)
fp.close()
fp=open("myFile", "a")
print("Writing data to file")
str="Hai welcome to the file handling concepts 2345"
fp.write(str)
fp.close()