input: Write a function to generate a random 6-digit number in Python and return it as a string. If the generated number is not 6 digits, raise a ValueError.
  
  assert generate_random_number()==str(random.randint(100000, 999999))
  assert len(generate_random_number())==6
  assert isinstance(generate_random_number(), str)
  assert not generate_random_number().startswith('0')
output: import random
  
  def generate_random_number():
      number = random.randint(100000, 999999)
      if len(str(number)) != 6:
          raise ValueError("Generated number is not 6 digits")
      return str(number)