0
print("""devone's""" """boy""")
I typed like this in the question but the output came as , output: devone'sboy why there is no space between devone's and boy...eventhough I have left space in the statement...pls explain...
3 Answers
+ 2
print statement in Python prints everything between (n)th and (n+1)th quotes where n is odd number if you take 1st quote as 1st. like between 1st & 2nd, 3rd & 4th etc.... space between 2nd & 3rd, 4th & 5th etc. quotes is not being considered by program
in your program "devone's" is between 3rd & 4th quotes and "boy" is between 9th & 10th quote. every thing else is ignored. in fact if you insert anything in place of that space, program will generate an error.
in short space is not considered as per similar example like,
print("Hello") & print ("Hello")
both will generate same result.
in addition if you want space between words, put that between quotes as rule explained in 1st paragraph
+ 1
whatever is written in quotes is printed blindly,
so even if you give spaces after quotes it won't be considered
but if you remove initial quotes and last quotes ,your code will work properly
+ 1
thanks guys