- Writing delimited files is easy. You simply combine the items for each line, separated by a comma, with a \n on the end and then write it to the file

#Open file for append (add to)
file = open('addresses.csv','a')
name = "Jay Jones"
address = "56 3rd St"
city = "Delaware"
phone = "08556 474562"
#Write a line separated by commas, \n on the end
file.write(name + "," + address + "," + city + "," + phone + "\n")
#Close file
file.close()
Tasks
- Type in the code above and make sure it works
- Modify the program to accept user input
- Save and label your code
Extension Task
You can implement a for or while loop in your program that will allow you to enter details for multiple people, either until a specific character is pressed or a set number of details have been entered. Can you make this work?