A comma-separated values (CSV) file is a delimited text file that uses a comma to separate value. A CSV file stores tabular data (numbers and text) in plain text. Each line of the file is a data record. Each record consists of one or more fields, separated by commas.
We have a csv file called countries.csv with the following data and which we will read "Country","Capital","Continent" "England","London","Europe" "United States","Washington, D.C.","North America" "India","New Delhi", "Asia" "Brazil","Brasília","South America" "Australia","Canberra","Oceania"
CODE
import csv
with open('countries.csv') as csvfile:
reader = csv.reader(csvfile, delimiter=',')
# print all rows
for row in reader:
print(row)
How to solve that 'BrasÃ\xadlia'?