input: Write a function to generate a random password of length 8, which must contain at least one lowercase letter, one uppercase letter, one digit, and one special character from the set: "!#$%&'()*+,-./:;<=>?@[\]^_`{|}~". Return the generated password as a string.
  assert generate_password()==True
  assert len(generate_password())==8
  assert any(c.islower() for c in generate_password())
output: import random
  import string
  
  def generate_password():
      lower = random.choice(string.ascii_lowercase)
      upper = random.choice(string.ascii_uppercase)
      digit = random.choice(string.digits)
      special = random.choice("!#$%&'()*+,-./:;<=>?@[\]^_`{|}~")
      remaining = random.choices(string.ascii_letters + string.digits + "!#$%&'()*+,-./:;<=>?@[\]^_`{|}~", k=4)
      password = [lower, upper, digit, special] + remaining
      random.shuffle(password)
      return ''.join(password)