This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import csv | |
| # Create a file with data in it | |
| def create_file(filename): | |
| with open(filename, "w") as file: | |
| file.write("name,color,type\n") | |
| file.write("carnation,pink,annual\n") | |
| file.write("daffodil,yellow,perennial\n") | |
| file.write("iris,blue,perennial\n") |