Is there a way to extract substrings from a textfile from each like e.g. Say this is the text file but with alot more lines like this:
president, Donald Trump, 74, USA
Priminster, Boris Johnson, 56, UK
I would need to loop through each line and get substrings which are split by commas.
So the that the substring would be Donald Trump, 74
and so on for the other lines.