Question: create a function called read_country_name(file) receives a file object as parameter and reads the country code and its corresponding full name. This function returns a
create a function called "read_country_name(file)" receives a file object as parameter and reads the country code and its corresponding full name. This function returns a list of 2-tuples, where each tuple contains (country_code, full name). Note: The file has the country name first, make sure to append them to the list in the required order.
link for the file: http://www.cse.msu.edu/~cse231/Online/Projects/Project07/country_names.txt
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
