Skip to content
Advertisement

Python CSV different delimiter

I am trying to read a file that has ` as delimiters. I have tried some of the other solutions for a different delimiter but none seemed to work.

JavaScript

example input file:

JavaScript

the expected out should be:

JavaScript

but this is what I get:

JavaScript

Thanks for your time!

Advertisement

Answer

I’d suggest using the DictReader class from the standard library like so:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement