string means just the sentence including quotation marks. For example "hello world" double quote means using ". single quote means '. Can someone tell me if the concept is right?? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

string means just the sentence including quotation marks. For example "hello world" double quote means using ". single quote means '. Can someone tell me if the concept is right??

13th Oct 2016, 11:19 AM
fatima tuz zahra abdullah
fatima tuz zahra abdullah - avatar
4 Antworten
+ 1
Yep. String is for representing text, and you put the text between a pair of quotes or double-quotes.
13th Oct 2016, 11:36 AM
Zen
Zen - avatar
+ 1
Concept's fine for these string literal types. What's nice about them is they allow naturally embedding the other type: "This string's got an apostrophe inside." 'This string has "double quotes" inside'
13th Oct 2016, 2:06 PM
Kirk Schafer
Kirk Schafer - avatar
0
a string can be either double or single qoute marks, but can not be double or single together. "string" or 'string' are both correct but "string' will not work.
17th Oct 2016, 3:47 AM
Alec Taylor
Alec Taylor - avatar
- 1
If we use single quotes... We have to give prefix as print. for eg: print 'hello word'...... Also if we want to use double quotes.. Its simply "hello word"
14th Oct 2016, 5:34 PM
Arshad.N