def size(iterable):
    """
    Returns the length of an iterable. 
    Caution: If this iterable is generator, this method would eat up the generator

    params: iterable
        iterable -> list, sequenece, set, dictionary, generator etc

    Examples:
    >>> gen = (i for i in range(0,10))
    >>> _.size(gen)
    >>> 10
    """
    try:
        return len(iterable)
    except TypeError:
        length = 0
        for i in iterable:
            length = length + 1
        return length