Define a function called get_n_largest(numbers, n) which takes a list of integers and a value n as parameters and returns a new list which contains the n largest values in the parameter list. The values in the returned list should be in increasing order. The returned list must always be of length n. If the number of values in the original list is less than n, the value None should be repeated at the end of the returned list to ensure it is the correct length.
Note: The parameter list should remain unchanged.
For example:
Test
Result
a_list = [36, 2, 8, 19, 4]
print(get_n_largest(a_list, 4))
Expected Output: [36, 19, 8, 4]
print(a_list)
Expected Output: [36, 2, 8, 19, 4]
a_list = [3, 6, 2]
print(get_n_largest(a_list, 4))
Expected Output: [6, 3, 2, None]
print(a_list)
Expected Output: [3, 6, 2]
print(get_n_largest([], 5))
Expected Output: [None, None, None, None, None]