Write a code that matches the following output.
Input: [5,9,2,7]
Output: [2,5,7,9]
```python
def sort_list(input_list):
    output_list = sorted(input_list)
    return output_list

input = [5,9,2,7]
output = sort_list(input)
print("Input:", input)
print("Output:", output)
```

This code takes in a list of unsorted numbers as input and returns the sorted list as the output. The `sorted()` function is used to sort the input list in ascending order. The input and output lists are printed to match the desired format.
Complete the following task based on the instruction and optional input provided.### Instruction:
Write a code that matches the following output.

### Input:
Input: [5,9,2,7]
Output: [2,5,7,9]

### Output:
```python
def sort_list(input_list):
    output_list = sorted(input_list)
    return output_list

input = [5,9,2,7]
output = sort_list(input)
print("Input:", input)
print("Output:", output)
```

This code takes in a list of unsorted numbers as input and returns the sorted list as the output. The `sorted()` function is used to sort the input list in ascending order. The input and output lists are printed to match the desired format.