0
python string
Does the sololearn code playground not support output in strings? I'm a beginner and I have been trying out the input eg. >>>"I am fair" as string Output 'i am fair' but it's not working, what should I do please?
5 odpowiedzi
+ 1
I tried print("I am fair") the Output was I am fair
I actually want the output to be 'i am fair'
what should I do using the sololearn code playground
+ 1
Use it like this,
print("string")
>>> Is not used to output
Strings are outputted without quotes
+ 1
Easy try
print ("\'I am fair\' ")
Use \ to use quotes or similar characters including \, ', " and use \n for a line break
+ 1
Hi, you can actually print it out as shown below
print("'i am fair'")
output: 'i am fair'
0
12ksins
it worked.
Thanks everyone