\ in Python


if x not in range(8) or \
y not in range(3):
print "Outside the range"

What is the purpose of the symbol \ in line 1 of the code. Also, can you give another example of \ in use.


You can use it if you have long lines of code and you want it to be more readable. Essentialy you can spread one line of code on more lines.


So, it just connects code on different lines?


As far as I know it connects line the slash is on with next line and interprets it as one line of code.