Python Advanced Programming HUB Flashcards
1
Q
What does it mean to write to a file?
A
- It will erase any information already on the file
2. It will save any information you have written to the file.
2
Q
What does it mean to append a file?
A
You are adding data without reading the data already stored in the file.
If there is data in the file, then the new data will begin where the old data ends.
3
Q
How would I create a new file using python?
A
Open(‘file1’,’w’)
4
Q
How would I make it possible for me to use the os module?
A
But coding in python import os
5
Q
What would I code to get a layout of your current working directory?
A
os.getcwd()