Python - String Concatenation
String Concatenation
To concatenate, or combine, two strings you can use the + operator.
Example
Merge variable a
with variable
b
into variable c
:
a = "Hello"
b = "World"
c = a + b
print(c)
Try it Yourself »
Example
To add a space between them, add a " "
:
a = "Hello"
b = "World"
c = a + " " + b
print(c)
Try it Yourself »