sábado, 27 de octubre de 2012

diccionarios en phyton how many elements are in


def howMany(aDict):
    '''
    aDict: A dictionary, where all the values are lists.

    returns: int, how many values are in the dictionary.
    '''
    sum=0
    for e in aDict:
        sum+=len(aDict[e])
       
    return sum

No hay comentarios:

Publicar un comentario