Week 6
File I/O and Numpy Array
File I/O
Open and Close
# Create a file for writing, called "my_file.txt"
new_file = open("my_file.txt", "w")# Close the file
new_file.close()with open("my_file.txt", "r") as f:
# Do something to the file here
print("hi")Write
Read
Reading with For loops
Last updated