'How can I read a csv file and store it in a txt file using specifically csv-parser

I have this csv file:

country,year,population
USA,1952,8425333
USA,1957,9240934
...

want to store it in a txt file:

country,year,population
USA,1952,8425333
USA,1957,9240934
...

This is an assignment for school and we are required to use csv-parser.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source