input: Write a function to sort and print out the elements of an array of integers. The function should return the sorted array.
  
  def sort_and_print(arr):
      arr.sort()
      print(arr)
      return arr
  
  assert sort_and_print([17, 41, 5, 22, 54, 6, 29, 3, 13]) == [3, 5, 6, 13, 17, 22, 29, 41, 54]
  assert sort_and_print([9, 7, 5, 3, 1]) == [1, 3, 5, 7, 9]
  assert sort_and_print([100, 200, 300, 50]) == [50, 100, 200, 300]
  assert sort_and_print([]) == []
  assert sort_and_print([1]) == [1]
output: def sort_and_print(arr):
      arr.sort()
      print(arr)
      return arr