input: Write a function to generate a Python program that sorts a list of numbers using the selection sort algorithm. The function should take an array as input, sort it in-place, and print the sorted array.
  
  assert sort_list([4, 2, 6, 7, 1])==[1, 2, 4, 6, 7]
  assert sort_list([3, 8, 2, 1, 5])==[1, 2, 3, 5, 8]
  assert sort_list([9, 3, 1, 7, 5])==[1, 3, 5, 7, 9]
  assert sort_list([10, 6, 4, 8, 2])==[2, 4, 6, 8, 10]
  assert sort_list([7, 3, 9, 2, 5])==[2, 3, 5, 7, 9]
output: def sort_list(arr):
      n = len(arr)
      for i in range(n):
          min_idx = i
          for j in range(i+1, n):
              if arr[j] < arr[min_idx]:
                  min_idx = j
          arr[i], arr[min_idx] = arr[min_idx], arr[i]
      return arr