def lists_cards(list_str):
    """
    This function produces two lists of the cards available. They
    comprise lists that represent the cards. Each card comprises of five sublists.
    In the first case, the sublists represent the rows of the cards and in the second
    case, the sublist represent the columns of the cards.
    Parameters:
        list (list): list of numbers (int)
    Returns:
        list_of_cards_rows, list_of_cards_cols (tuple): list of cards
    """
    # convert the cards to lists comprising five lists each. Each sublist is a row
    list_of_cards_rows = []
    card = []
    for row in list_str[2:]:
        if row != "":
            row_list = [int(i) for i in row.split()]
            card.append(row_list)
        else:
            list_of_cards_rows.append(card)
            card = []
    list_of_cards_rows.append(card)

    list_of_cards_cols = []
    for i in range(len(list_of_cards_rows)):
        card = []
        for j in range(5):
            row = list_of_cards_rows[i][j]
            column = []
            for m in range(5):
                col = list_of_cards_rows[i][m][j]
                column.append(col)
            card.append(column)
        list_of_cards_cols.append(card)
    return list_of_cards_rows, list_of_cards_cols