If in a file the values present are in either ” or , separated values
"Name" "Tom" "CODE 041" "Has"
"Address" "NSYSTEMS c/o" "First Term" "123" 18
"Occ" "Engineer" "Level1" "JT" 18
How should the python script be written so as to get all the above values individually
Your question is a little vague, and there are no commas in your example, so it’s a bit hard to provide a good answer.
On your example file containing
this script
produces
This assumes that the delimiter between values is a space. If it’s a tab, use
delimiter='\t'instead.You’re out of luck with this approach if delimiters change throughout the file – in this case they are not valid CSV/TSV files anymore. But all this is just speculation until you can provide some actual and relevant examples of the data you want to analyse.