def sum_list(L):
    """
    (int or arbitrarily nested list of int) -> int
    
    Return the sum of all ints in L.
    
    >>> sum_list([1, [2, 3], [4, 5, [6, 7], 8]])
    36
    """
    
    if isinstance(L, list):
        return sum([sum_list(x) for x in L])
    
    else:
        return L