Python. How to solve the problem with the encoding of the output CSV file in the terminal?

0 like 0 dislike
58 views
Good afternoon, started to learn Python, came to a CSV file and output data to the terminal.
Faced with the problem of encoding.
Plz tell me that where to paste, that was not kryakozyabry?

System: Windows 10 3.7.1 Python, Visual Studio Code, terminal cmder as bash

Code:
exampleFile = open('example.csv') exampleReader = csv.reader(exampleFile) exampleData = list(exampleReader) print(exampleData)


Conclusion:
5c177e2b6eb4a357964294.jpeg
by | 58 views

1 Answer

0 like 0 dislike
https://docs.python.org/3/library/csv.html#reader-...
import csv with open('some.csv', newline=", encoding='utf-8') as f: reader = csv.reader(f) for row in reader: print(row)
by

Related questions

0 like 0 dislike
4 answers
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users