Back
For concatenating or joining any two strings in Python, you need to use the + operator. Refer to the below code for implementation:
var1 = "Hello "var2 = "World"# + Operator is used to combine the strings var3 = var1 + var2 print(var3)
var1 = "Hello "
var2 = "World"
# + Operator is used to combine the strings
var3 = var1 + var2
print(var3)
The output:
Hello World
If you are looking for an online course to learn Python, I recommend this Python Course by Intellipaat.
31k questions
32.8k answers
501 comments
693 users