Python - Structured Data Files
What will be the output of this code snippet?
import csv
with open('data.csv', 'w', newline='') as f:
writer = csv.writer(f)
writer.writerow(['Name', 'Age'])
writer.writerow(['Alice', '30'])
with open('data.csv', 'r') as f:
reader = csv.reader(f)
rows = list(reader)
print(rows)