Solution Review: Append Data into a CSV file
This review provides a detailed explanation of the solution to the "Append Data into a CSV file" challenge.
We'll cover the following...
We'll cover the following...
Solution
Let’s understand the solution of the challenge in Python and Powershell.
Python
Note: Run the
cat Test.csv
command after hitting the “Run” button to see the expectedTest.csv
file.
from csv import writer with open('Test.csv', 'a') as f: w_obj = writer(f) w_obj.writerow(['Michel','London']) f.close()
Solution in Python
Explanation
- In line 1,