2020/20.py
def print_assignments(assignments):
    """
    Print an entire assignments array. This can be used at the very end to print the
    picture.
    """
    for r in assignments:
        print(r)
    for row in assignments:
        print()
        sidelen = len(TILES[row[0][0]])
        rowlines = ["" for _ in range(sidelen)]

        for col, rotation, flip in row:
            for i in range(len(rowlines)):
                rowlines[i] += " "
            pic = TILES[col]
            if flip:
                pic = [list(reversed(x)) for x in pic]
            for _ in range(rotation):
                pic = list(zip(*pic[::-1]))
            for i, row in enumerate(pic):
                rowlines[i] += "".join([".#"[int(x)] for x in row])
        for row in rowlines:
            print(row)

    Print an entire assignments array. This can be used at the very end to print the
    picture.
    
Print an entire assignments array. This can be used at the very end to print the
picture.
Print an entire assignments array . This can be used at the very end to print the picture .
def print_assignments(assignments):
    for r in assignments:
        print(r)
    for row in assignments:
        print()
        sidelen = len(TILES[row[0][0]])
        rowlines = ["" for _ in range(sidelen)]
        for col, rotation, flip in row:
            for i in range(len(rowlines)):
                rowlines[i] += " "
            pic = TILES[col]
            if flip:
                pic = [list(reversed(x)) for x in pic]
            for _ in range(rotation):
                pic = list(zip(*pic[::-1]))
            for i, row in enumerate(pic):
                rowlines[i] += "".join([".#"[int(x)] for x in row])
        for row in rowlines:
            print(row)
def print_assignments ( assignments ) : for r in assignments : print ( r ) for row in assignments : print ( ) sidelen = len ( TILES [ row [ 0 ] [ 0 ] ] ) rowlines = [ "" for _ in range ( sidelen ) ] for col , rotation , flip in row : for i in range ( len ( rowlines ) ) : rowlines [ i ] += " " pic = TILES [ col ] if flip : pic = [ list ( reversed ( x ) ) for x in pic ] for _ in range ( rotation ) : pic = list ( zip ( * pic [ : : - 1 ] ) ) for i , row in enumerate ( pic ) : rowlines [ i ] += "" . join ( [ ".#" [ int ( x ) ] for x in row ] ) for row in rowlines : print ( row )
Print an entire assignments array.
Print an entire assignments array .
"""
    Print an entire assignments array. This can be used at the very end to print the
    picture.
    """
assignments