def clean_codeblock(text):
    """Remove codeblocks and empty lines, return lines."""
    text = text.strip(" `")
    lines = text.split("\n")
    clean_lines = []

    if lines[0] in ["py", "python"]:
        lines = lines[1:]

    for line in lines:
        if line.strip() != "":
            clean_lines.append(line)

    return clean_lines