input: Write a function to generate random passwords that consist of 8 characters. If the given array is empty then return an empty string.
  assert generate_password()=="random" # Replace "random" with any 8-character string 
  assert generate_password()=="string" # Replace "string" with any 8-character string 
  assert generate_password()=="example" # Replace "example" with any 8-character string 
  assert generate_password()=="abcdefgh" # Replace "abcdefgh" with any 8-character string 
  assert generate_password()=="12345678" # Replace "12345678" with any 8-character string
output: import random
  import string
  
  def generate_password():
      characters = string.ascii_letters + string.digits
      return ''.join(random.choice(characters) for _ in range(8))