The code doesn't run any error messages, but my debug consistently has the ships at a value of 0. So of course I hit them.
I forgot what the  is doing there I'd need to check back.
Ideally I am expecting ship2R (second ship row) and ship2C (second ship column) to generate fresh if they conflict with the location of the original ship created in the tutorial.
def ship2_gen(board): return randint(0, len(board) - 1) #This defines the variables globally for the assign functions to edit. ship2R = 0 ship2C = 0 def ship2_assignR(board): ship2R = ship2_gen(board) if ship2R == ship_row or ship2R == ship_col: ship2R = ship2_gen(board) return ship2R def ship2_assignC(board): ship2C = ship2_gen(board) if ship2C == ship_row or ship2C == ship_col: ship2C = ship2_gen(board) return ship2C ship2_assignR(board) ship2_assignC(board) #DEBUG print ship2R print ship2C.