input: Write a function to generate a list of autocomplete suggestions based on a given prefix from a provided dictionary. The function should iterate through the dictionary and check if each word starts with the given prefix, adding it to a result list if it does. The function should return this result list.
  assert auto_complete(["dog", "deer", "deal", "dungeon", "dark", "dusk"], "d") == ['dog', 'deer', 'deal', 'dungeon', 'dark', 'dusk']
  assert auto_complete(["dog", "deer", "deal", "dungeon", "dark", "dusk"], "de") == ['deer', 'deal', 'dungeon']
  assert auto_complete(["dog", "deer", "deal", "dungeon", "dark", "dusk"], "do") == ['dog']
  assert auto_complete(["dog", "deer", "deal", "dungeon", "dark", "dusk"], "x") == []
  assert auto_complete([], "d") == []
output: def auto_complete(dictionary, prefix):
      return [word for word in dictionary if word.startswith(prefix)]