Presentation is loading. Please wait.

Presentation is loading. Please wait.

Appending or adding to a file using python

Similar presentations


Presentation on theme: "Appending or adding to a file using python"— Presentation transcript:

1 Appending or adding to a file using python
What we are going to use is the append function in python to create a notepad file and write into it

2 Append code What appears in green is the string that will appear in the file \n creates a new line Open creates a new text file in notepad Append file write starts process of writing to a file called example file You must use append file close to stop the writing process and then when you search your documents you will find a document called examplefile

3 Reading a file using python
Sometimes you will need to write a program that reads a file line by line In this program we are going to use python function to read files


Download ppt "Appending or adding to a file using python"

Similar presentations


Ads by Google