Download presentation
Presentation is loading. Please wait.
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.