(lang)
return res
Takes a list of language codes and returns a list of tuples
    with (code, name)
Takes a list of language codes and returns a list of tuples
    with (code, name)
Takes a list of language codes and returns a list of tuples with ( code name )
def get_language_names(lang):
    """
    Takes a list of language codes and returns a list of tuples
    with (code, name)
    """
    res = {}
    for l in lang:
        try:
            locale = Locale(l)
        except UnknownLocaleError:
            continue

        if locale.display_name:
            res[l] = locale.display_name

    return res
def get_language_names ( lang ) : res = { } for l in lang : try : locale = Locale ( l ) except UnknownLocaleError : continue if locale . display_name : res [ l ] = locale . display_name return res