input: from typing import List
  
  import string
  import random
  
  def generate_passwords(num: int) -> List[str]:
      """ Generate a list of random passwords, each consisting of 8 characters.
      >>> passwords = generate_passwords(3)
      >>> len(passwords) == 3
      True
      >>> all(len(pw) == 8 for pw in passwords)
      True
      """
      chars = string.ascii_letters + string.digits
      return [''.join(random.choice(chars) for _ in range(8)) for _ in range(num)]
output:     chars = string.ascii_letters + string.digits
      return [''.join(random.choice(chars) for _ in range(8)) for _ in range(num)]