[Tutor] Uses for backslashes

Jack Simpson simpsonrmz41 at gmail.com
Sun Jun 25 03:05:46 EDT 2023


Hi,

I'm going through some quizzes and tutorials in a coding course I am
completing and these backslashes are being used in some lines of code. I
have researched and have found that it changes the meaning of the
following character i.e. \n is a line feed, \t is a new tab but I can"t
find why it is used in a case like this. Thanks for your help.

var1 = "my computer" >= "my chair"
var2 = "Spring" <= "Winter"
var3 = "pineapple" >= "pineapple"

print("Is \"my computer\" greater than or equal to \"my chair\"? Result: "
, var1)
print("Is \"Spring\" less than or equal to \"Winter\"? Result: ", var2)
print("Is \"pineapple\" less than or equal to \"pineapple\"? Result: "
, var3)


More information about the Tutor mailing list