def calc_avgstrlen_pathstextnodes(pars_tnodes, dbg=False):
    """In the effort of not using external libraries (like scipy, numpy, etc),
    I've written some harmless code for basic statistical calculations
    """
    ttl = 0
    for _, tnodes in pars_tnodes:
        ttl += tnodes[3]        # index #3 holds the avg strlen

    crd = len(pars_tnodes)
    avg = ttl/crd
    if dbg is True:
        print(avg)
    #       avg = ttl/crd
    return (avg, ttl, crd)
def calc_avgstrlen_pathstextnodes ( pars_tnodes , dbg = False ) : ttl = 0 for _ , tnodes in pars_tnodes : ttl += tnodes [ 3 ] crd = len ( pars_tnodes ) avg = ttl / crd if dbg is True : print ( avg ) return ( avg , ttl , crd )
In the effort of not using external libraries (like scipy, numpy, etc),
    I've written some harmless code for basic statistical calculations