EN
Python - string concatenation
0 points
In this article, we would like to show you how to concatenate strings in Python.
Quick solution:
xxxxxxxxxx
1
string1 = "AB"
2
string2 = "CD"
3
4
result = string1 + string2
5
print(result) # ABCD
In this example, we present how to concatenate strings using +
operator.
xxxxxxxxxx
1
string1 = "Dirask"
2
string2 = "awesome!"
3
4
result = string1 + " is " + string2
5
print(result)
Output:
xxxxxxxxxx
1
Dirask is awesome!