input: Write a function to generate a Random Password of length 8 characters, which contains at least one of each character type (lowercase, uppercase, digits, special characters). If the function is called, it should return the generated password as a string.
  assert generate_password()==string_containing_8_char
  assert generate_password()==string_containing_8_char
  assert generate_password()==string_containing_8_char
output: import random
  import string
  
  def generate_password():
      lowercase = random.choice(string.ascii_lowercase)
      uppercase = random.choice(string.ascii_uppercase)
      digit = random.choice(string.digits)
      special = random.choice(string.punctuation)
      remaining = random.choices(string.ascii_letters + string.digits + string.punctuation, k=4)
      password = lowercase + uppercase + digit + special + ''.join(remaining)
      return ''.join(random.sample(password, len(password)))