countries = [
Quotes and commas are for lists and strings specified as literals in code. You don't need that for data you are reading programmatically.
Just read the lines and strip off the tailing newlines.
with open('countries.text') as src: countries = [row.strip('\n') for row in src]