How to give space between two strings while doing concatenation? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to give space between two strings while doing concatenation?

30th Sep 2016, 4:24 PM
Ajay Nagaram
Ajay Nagaram - avatar
5 Answers
+ 6
As the 2 other replies show, just add a space character between either single or double quotes (usually) and preface and follow it with whatever symbol is used for concatenation in the language you are using - (such as "+" or "&" symbols). Since you didn't specify WHICH language you needed this answer for we can't be more specific unless you are. Perhaps SoloLearn should add a "language" drop down option to questions posted so we'll know where they are coming from (what group) or if it's just a general programming or unrelated question.
30th Sep 2016, 5:43 PM
DevCoder (John Sullivan)
DevCoder (John Sullivan) - avatar
+ 3
s1='Hello' s2='World' print (s1+' '+s2)
30th Sep 2016, 5:40 PM
Narayana
Narayana - avatar
0
try this: (string1+' ' +string2)
30th Sep 2016, 5:17 PM
Tal Kenigs
Tal Kenigs - avatar
0
u use there's 2 types of/n which its wrong but \n to live a space between two word
2nd Oct 2016, 12:33 AM
Unknown
Unknown - avatar
0
nice
3rd Oct 2016, 9:05 AM
Shubham Jadhav
Shubham Jadhav - avatar