+ 1
How to create string/ what is string tag
3 Answers
+ 4
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2274/?ref=app
x = "This is a string. "
y = 'Is there anything else you need?'
print(x + y)
+ 3
Put single or double quotes around the words or sentence to create a string variable.
Example:
name = "Milad Ahmed"
language = "Python"
place = 'SoloLearn'
print(name + " is learning " + language + ' in ' + place)
This will show on screen;
Milad Ahmed is learning Python in SoloLearn
Not really sure what you meant by string tag there, can you elaborate more?
+ 2
String is just a data type which is commonly used in python. Remember that everything which is under the two ' ' or " " is a string. e.g="Hello" or "123"
we know 123 is a integer but in this example it is under the two " " so now it is string.you can compare two strings with it like.
"Hi"=="Hi"
computer don't know what is Hi but when you write it in two ' ' or " " then computer know oh this is Hi.
there is so many methods for string you can check it by Google.