0

Why ' and " work same in print statement? Or Is this matter ?

print ('a') print ("a") Both output will be a

6th May 2020, 6:27 PM
Prajwal S
Prajwal S - avatar
2 Antworten
+ 4
print functions usually convert everything you give them to string, so it is text for the console. About " vs ' It depends on the language. Some languages (Like Java) uses " for String Objects and ' for Character Objects Languages like python make no difference between " and ' But, if you need single quote as part of the string, probably you want to use double quote. double_quote = "It's an a" single_quote = 'It\'s an a'
6th May 2020, 6:35 PM
Eric Bastian Ramírez Santis
Eric Bastian Ramírez Santis - avatar
0
Thank you.. ✌
7th May 2020, 2:05 AM
Prajwal S
Prajwal S - avatar