+ 2
Can someone explain this ?
print(r"/n sololearn") >>>/n sololearn
6 Answers
+ 6
r is used for raw string. it prints everything regardless. So instead of '\n' being a newline character it's just a '\' foward slash and an 'n' right next to eachother.
+ 2
The r represent raw string and that /n should be \n which mean a new line so the code should be
print (r"sololearn"+"\n");
>>sololearn
+ 2
omer_ctr NotAPythonNinja you are right I just corrected it The r represent raw string and that /n should be \n which mean a new line so the code should be
print (r"sololearn"+"\n");
>>sololearn
+ 1
Slick thank you so much bro ,this is new for me đđ
+ 1
George, i sow this in a code challange and it really confused me , the output is really >>>/n sololearn
+ 1
Oh yes ,u right bro