Write a function in Python that takes an array and prints the largest number

array = [1, 3, 10, 4]
user
def print_largest_number(array):
  largest = array[0]
  for i in array:
    if i > largest:
      largest = i
  print(largest)
  
print_largest_number(array)
assistant