input: Write a function to create a list of tuples where each tuple contains the index and the square of each element in the input list of integers. If the input list is empty, the function should return an empty list.
  def square_index(nums):
      return [(index, num ** 2) for index, num in enumerate(nums)]
  
  assert square_index([1, 2, 3, 4, 5])==[(0, 1), (1, 4), (2, 9), (3, 16), (4, 25)]
  assert square_index([])==[]
output: def square_index(nums):
      return [(index, num ** 2) for index, num in enumerate(nums)]