input: Write a function to list the contents of a specified directory using Python. The function should return the list of files and directories found in the specified directory. If the directory does not exist, the function should return an empty list.
  assert list_directory_contents("C:/Users/Public")==['Libraries', 'Music', 'Pictures', 'Videos', 'Templates', 'Administrative Tools', 'Documents', 'Desktop', 'Downloads', 'Favorites', 'Links', 'Contacts', 'Searches', 'OneDrive']
  assert list_directory_contents("nonexistent_directory")==[]
  assert list_directory_contents("C:/Windows/System32")==['drivers', 'en-US', 'Fonts', 'immersivetouch', 'LogFiles', 'Resources', 'Speech', 'Tasks', 'wbem', 'WindowsPowerShell', 'WindowsUpdate.log', 'winevt', 'WinSxS', 'write.exe', 'wusa.exe', 'xaa']
  assert list_directory_contents("")==[]
output: import os
  
  def list_directory_contents(directory):
      if not os.path.exists(directory):
          return []
      return os.listdir(directory)