How does python knows i want \n


#1



i have learn c before
when i coded this code all was seen well, but i didn't understand how does the system knows to do \n (to go down to another row)


Replace this line with your code. board=[]

for i in range(0,5):
    board.append(['O','O','O','O','O'])
    
def print_board(board):
    for i in board:
            print " ".join(i)
         
print print_board(board)


#2

you don't use \n?

each print statement prints on a new line by default, even when print statement is in loop


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.