def make_inv_cts(cts):
    """
    cts is e.g. {"Germany" : "DEU"}. inv_cts is the inverse: {"DEU" : "Germany"}
    """
    inv_ct = {}
    for old_k, old_v in cts.items():
        if old_v not in inv_ct.keys():
            inv_ct.update({old_v : old_k})
    return inv_ct
def make_inv_cts ( cts ) : inv_ct = { } for old_k , old_v in cts . items ( ) : if old_v not in inv_ct . keys ( ) : inv_ct . update ( { old_v : old_k } ) return inv_ct
cts is e.g. {"Germany" : "DEU"}. inv_cts is the inverse: {"DEU" : "Germany"}