\ in Python


#1

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.


#2

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.


#3

So, it just connects code on different lines?


#4

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