Exemplo n.º 1
0
def get_input_data() -> list[tuple]:
    instructions = []
    for i in read_input_lines(__file__, day=2):
        (direction, x) = i.strip().split(" ")
        instructions.append((direction, int(x)))

    return instructions
Exemplo n.º 2
0
def get_input_data():
    return read_input_lines(__file__, 3)
Exemplo n.º 3
0
def get_input_data() -> list[str]:
    return read_input_lines(__file__, 4)
Exemplo n.º 4
0
def get_input_data():
    return [int(i.strip()) for i in read_input_lines(__file__, 1)]
Exemplo n.º 5
0
def get_input_data() -> list[list[int]]:
    data = [i.strip().split("\t") for i in read_input_lines(__file__, 2)]
    table = [[int(j) for j in i] for i in data]

    return table
Exemplo n.º 6
0
def get_input_data() -> str:
    return read_input_lines(__file__, 1)[0]
Exemplo n.º 7
0
def get_input_data():
    return array.array("I",
                       map(int,
                           read_input_lines(__file__, 2)[0].split(",")))
Exemplo n.º 8
0
def get_input_data() -> list[str]:
    return [i.strip() for i in read_input_lines(__file__, 2)]
Exemplo n.º 9
0
def get_input_data() -> list[Paper]:
    return [
        Paper(*map(int, i.split("x"))) for i in read_input_lines(__file__, 2)
    ]
Exemplo n.º 10
0
def get_input_data():
    return map(parse_command, read_input_lines(__file__, 1)[0].split(","))