def next_unwrittable_on_col(view, coords):
    """Return position of the next letter (in column) that is unwrittable"""
    x, y = coords
    maxy = max(view.keys(), key=itemgetter(1))[1]
    for offset in range(y + 1, maxy):
        letter = view[x, offset]
        if letter not in REWRITABLE_LETTERS:
            return offset
    return None
def next_unwrittable_on_col ( view , coords ) : x , y = coords maxy = max ( view . keys ( ) , key = itemgetter ( 1 ) ) [ 1 ] for offset in range ( y + 1 , maxy ) : letter = view [ x , offset ] if letter not in REWRITABLE_LETTERS : return offset return None
Return position of the next letter (in column) that is unwrittable