python string | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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?

14th May 2020, 3:49 PM
Ijeoma Ugochinyere Eze
5 Answers
+ 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
14th May 2020, 4:01 PM
Ijeoma Ugochinyere Eze
+ 1
Use it like this, print("string") >>> Is not used to output Strings are outputted without quotes
14th May 2020, 3:58 PM
12ksins
12ksins - avatar
+ 1
Easy try print ("\'I am fair\' ") Use \ to use quotes or similar characters including \, ', " and use \n for a line break
14th May 2020, 4:04 PM
12ksins
12ksins - avatar
+ 1
Hi, you can actually print it out as shown below print("'i am fair'") output: 'i am fair'
14th May 2020, 4:11 PM
Taofeeq Olawale Saad
0
12ksins it worked. Thanks everyone
14th May 2020, 4:10 PM
Ijeoma Ugochinyere Eze