I have two lists:
country_name = ['South Africa', 'India', 'United States']
country_code = ['ZA', 'IN', 'US']
I want to group the country name and its corresponding code together and then perform a sort operation to do some processing
When I tried to zip these 2 lists, I am getting the 1st character from both the lists as the output.
I also tried doing this:
for i in xrange(0,len(country_code):
zipped = zip(country_name[i][:],country_code[i][:])
ccode.append(zipped)
to zip the entire string, but it didn't work. Also I am not sure that after zipping the 2 list, I will be able to sort the resulting list or not.