def doubler(list1, list2):
    """
    Both arguments are lists of integers.  This function:
      -- MUTATEs the first list by doubling each number in the list
    and
      -- RETURNs a new list that is the same as list2 but with each
           number in the list doubled.

    For example, if the two arguments are:
       [10, -3, 20, 4]  and  [5, 0, 8]
    then this method MUTATEs the first argument to [20, -6, 40, 8]
    and RETURNs the list [10, 0, 16]

    Preconditions:
        :type list1: list of int
        :type list2: list of int
    """
    newlist=[]
    for k in range(len(list1)):
        list1[k]=list1[k]*2

    for j in range(len(list2)):
        newlist=newlist+[list2[j]*2]
    return newlist
    # ------------------------------------------------------------------
    # DONE: 3. Implement and test this function.
    #   Note that you should write its TEST function first (above).
    # ------------------------------------------------------------------
    # ------------------------------------------------------------------
    # DIFFICULTY AND TIME RATINGS (see top of this file for explanation)
    #    DIFFICULTY:      4
    #    TIME ESTIMATE:   5 minutes.
    # ------------------------------------------------------------------