[Python] what is the purpose of the \ because they do not affect the function of the code?...

Discussão em 'Python' iniciado por Stack, Junho 13, 2025.

  1. Stack

    Stack Membro Participativo

    I have a university assignment to create a noughts&crosses/tictactoe game from a given template and this below was part of it:

    board = [['1','2','3'],\
    ['4','5','6'],\
    ['7','8','9']]


    Whether those backslashes are present or not it doesnt affect the function of the code as the list gives the same printed output and behaves in the same way so I'm just curious as to what their purpose is?

    Continue reading...

Compartilhe esta Página