print ('c:\' ) shows folder name | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

print ('c:\' ) shows folder name

Please see attached code. This seems to only apply on sololearn interpreter. Can not find details in other documentation. Why does print ('c:\') show current directory name. I know sololearn is based on windows server which explains c is the drive name. What happens behind the scene to produce this? https://code.sololearn.com/cIS2v1RB8r6h/?ref=app

7th Mar 2019, 4:46 PM
10101
2 Answers
+ 2
print("c:\\") use double slash to print c:\ in output
9th Mar 2019, 12:49 AM
Programmer Raja
Programmer Raja - avatar
+ 1
I understand the escape. I do not understand how a string of 'c:\' translate to the directory name. This only seems to occur within the Sololearn interpreter.
9th Mar 2019, 4:16 AM
10101