def convert_1d_to_2d(l, cols):
    return [l[i:i + cols] for i in range(0, len(l), cols)]

l = [0, 1, 2, 3, 4, 5]

print(convert_1d_to_2d(l, 2))
# [[0, 1], [2, 3], [4, 5]]

print(convert_1d_to_2d(l, 3))
# [[0, 1, 2], [3, 4, 5]]

print(convert_1d_to_2d(l, 4))
# [[0, 1, 2, 3], [4, 5]]

def convert_1d_to_2d_rows(l, rows):
    return convert_1d_to_2d(l, len(l) // rows)

print(convert_1d_to_2d_rows(l, 2))
# [[0, 1, 2], [3, 4, 5]]

print(convert_1d_to_2d_rows(l, 3))
# [[0, 1], [2, 3], [4, 5]]

print(convert_1d_to_2d_rows(l, 4))
# [[0], [1], [2], [3], [4], [5]]

16c0f1a3769a933718901b75d2055e0dc0e40500
<mask token>


def convert_1d_to_2d_rows(l, rows):
    return convert_1d_to_2d(l, len(l) // rows)


<mask token>

def convert_1d_to_2d(l, cols):
    return [l[i:i + cols] for i in range(0, len(l), cols)]


<mask token>


def convert_1d_to_2d_rows(l, rows):
    return convert_1d_to_2d(l, len(l) // rows)


<mask token>

def convert_1d_to_2d(l, cols):
    return [l[i:i + cols] for i in range(0, len(l), cols)]


<mask token>
print(convert_1d_to_2d(l, 2))
print(convert_1d_to_2d(l, 3))
print(convert_1d_to_2d(l, 4))


def convert_1d_to_2d_rows(l, rows):
    return convert_1d_to_2d(l, len(l) // rows)


print(convert_1d_to_2d_rows(l, 2))
print(convert_1d_to_2d_rows(l, 3))
print(convert_1d_to_2d_rows(l, 4))

def convert_1d_to_2d(l, cols):
    return [l[i:i + cols] for i in range(0, len(l), cols)]


l = [0, 1, 2, 3, 4, 5]
print(convert_1d_to_2d(l, 2))
print(convert_1d_to_2d(l, 3))
print(convert_1d_to_2d(l, 4))


def convert_1d_to_2d_rows(l, rows):
    return convert_1d_to_2d(l, len(l) // rows)


print(convert_1d_to_2d_rows(l, 2))
print(convert_1d_to_2d_rows(l, 3))
print(convert_1d_to_2d_rows(l, 4))

def convert_1d_to_2d(l, cols):
    return [l[i:i + cols] for i in range(0, len(l), cols)]

l = [0, 1, 2, 3, 4, 5]

print(convert_1d_to_2d(l, 2))
# [[0, 1], [2, 3], [4, 5]]

print(convert_1d_to_2d(l, 3))
# [[0, 1, 2], [3, 4, 5]]

print(convert_1d_to_2d(l, 4))
# [[0, 1, 2, 3], [4, 5]]

def convert_1d_to_2d_rows(l, rows):
    return convert_1d_to_2d(l, len(l) // rows)

print(convert_1d_to_2d_rows(l, 2))
# [[0, 1, 2], [3, 4, 5]]

print(convert_1d_to_2d_rows(l, 3))
# [[0, 1], [2, 3], [4, 5]]

print(convert_1d_to_2d_rows(l, 4))
# [[0], [1], [2], [3], [4], [5]]
