students = open("student.csv","a")
- using \n for adding to a new line
students.write("\n1, will, 29 , male")
students.close()
- Checking if new data is added
students = open("student.csv","r")
print(students.read())
students.close()
- using \n for adding to a new line
with open("student.csv", "a") as students:
student = students.write("\n6, rose, 29 , female")
print(student)
with open("student.csv", "r") as students:
for student in students:
print(student)