Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update file #18

Merged
merged 3 commits into from
Dec 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Learn to handle your file/Reading from a file.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**Authors:** Annu Jolie

**Edits:** Pranav Shridhar
**Edits:** Pranav Shridhar, Diya Maria Deepak

***

Expand Down Expand Up @@ -30,8 +30,8 @@ By default the read() method returns the whole text, but you can also specify ho

**_Example_**
```python
new_file = open("test.txt", "w")
print(new_file.read(12))
new_file = open("test.txt", "r")
print(new_file.read(13))
new_file.close()
```
The output of the code will be :-
Expand Down
4 changes: 2 additions & 2 deletions Learn to handle your file/writing to a file.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**Authors:** Annu Jolie

**Edits:** Pranav Shridhar
**Edits:** Pranav Shridhar, Diya Maria Deepak

***

Expand Down Expand Up @@ -73,7 +73,7 @@ Here we open a file called *new.txt*. We have a *for loop* that runs over a rang
```python
f= open("new.txt","a")
for i in range(5):
f.write("This is line \n" ,(i+1))
f.write("This is line "+str((i+1))+"\n")
f.close()

```
Expand Down