This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
So I’m just starting a beginner python course on Udemy called “2020 complete python Bootcamp: from zero to hero in python”. It’s going great but I want to make sure I’m understanding the difference between two ways of opening and reading txt/CSV files.
The course has me do the whole %%writefile newfile.txt method, but then switches to “with open (“newfile.txt”, mode = “w”) as f:
The second one is described as you don’t need to close the file.
Can’t you create a file with either one? I’m not quite understanding the application differences between the two I guess.
Any help is appreciated!
Subreddit
Post Details
- Posted
- 3 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/learnpython...