Program to move in a 2d array given instructions, array and starting position
A loop that does different things based on how many times the loop has executed is a code smell.  It's harder to understand then breaking the loop into discrete steps.
And put it in a function.  Pass in the file, so you can use a file or io.StringIO instead of sys.stdin for testing.
def load_problem(file_input):
    r, c, k = map(int, file_input.readline().strip().split())

    instructions = file_input.readline().strip()

    room = [file_input.readline() for _ in range(r)]

    return room, instructions

Simplified find_start() a bit:
def find_start(room):
    for r,row in enumerate(room):
        c = row.find('O')
        if c &gt;= 0:
            return r,c

Code to solve the problem can go in another function.
A set() is great for keeping track of places you've visited.
The duplication of code can be eliminated by using the instruction to select an x-step (dc) and y-step (dr) to be added to the current position.
STEP = {
    '&gt;':( 0, 1),
    'v':( 1, 0),
    '&lt;':( 0,-1),
    '^':(-1, 0)
}

def solve_problem(room, instructions):
    r, c = find_start(room)
    
    visited = set()
    visited.add((r, c))
    
    for instruction in instructions:
        dr, dc = STEP[instruction]
        
        while room[r + dr][c + dc] != '#':
            r += dr
            c += dc
            visited.add((r, c))

    return len(visited)

Drive the whole thing:
room, instructions = load_problem(sys.stdin)
result = solve_problem(room, instructions)
print(result)