def rotate_list(alist):
    """Pop the last element of list out then put it into the first of list.
    :param alist: A list that want to rotated.
    :return alist: A rotated list.
    """
    assert type(alist) == list
    last = alist.pop()
    alist.insert(0, last)
    return alist