Skip to content

Commit 195446d

Browse files
authored
Update WriteContetToFile.md
1 parent b60ed02 commit 195446d

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

FileHandeling/WriteContetToFile.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33

44
### Write Contents
55

6-
For writing content to a file there are two scenarios
6+
For writing content to a file, there are two scenarios
77

88
#### 1.write on existing file.
99
for writing content to a file use following two modes in **open()** function
1010

1111
**Modes for writing file**
1212

1313
#### 1. a
14-
This will append the content at the end of file.
14+
This will append the content at the end of the file.
1515

1616
#### 2. w 
1717
This will overwrite any existing content to a file.
@@ -45,7 +45,7 @@ Now **data.txt** contains
4545
I am new text
4646
```
4747

48-
Example for appending content
48+
Example of appending content
4949
File **data.txt** contains
5050
```
5151
Hi,
@@ -74,7 +74,7 @@ To create a new file in Python, use the **open()** method, with one of the foll
7474

7575
**1.x**
7676
- Exclusive create.
77-
- will create a file, returns an error if the file exist.
77+
- will create a file, returns an error if the file exists.
7878

7979
**1.a**
8080
- Append mode.
@@ -84,7 +84,7 @@ To create a new file in Python, use the **open()** method, with one of the foll
8484
- Write mode.
8585
- will create a file if the specified file does not exist.
8686

87-
You can use above modes to create a empty file using **open()** methods
87+
You can use the above modes to create an empty file using **open()** methods
8888

8989
Example:
9090
Consider there is no file named **mydata.txt** inside current directory.
@@ -124,7 +124,7 @@ lines=['hello','hi']
124124
fil.writelines(lines)
125125
```
126126

127-
If you check content of file **mydata.txt**
127+
If you check the content of file **mydata.txt**
128128
```
129129
hello
130130
hi

0 commit comments

Comments
 (0)