import random


def method_1(num_chars: int):
    """
    Hand Implemented Method to generate a random password
    of num_chars long

    Args:
        num_chars (int): Number of Characters the password will be

    Returns:
        string: The generated password
    """
    lower = "abcdefghijklmnopqrstuvwxyz"
    upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    digits = "0123456789"
    punctuation = "!\"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ "

    characters = lower + upper + digits + punctuation
    chars_lst = list(characters)

    # Mix up the list
    random.shuffle(chars_lst)

    # Pick random character from list
    password = []
    for i in range(num_chars):
        password.append(random.choice(chars_lst))

    # Shuffle the list for good messure
    random.shuffle(password)

    # Convert list to a string
    password = "".join(password)

    return password