Skip to content

Python String Concatenation

Syntax

String concatenation in Python is performed using the + operator.

# Using the + operator
string1 = "Hello"
string2 = "World"
result = string1 + " " + string2

Example

# Concatenating a greeting and a user's name
first_name = "John"
last_name = "Doe"
full_name = first_name + " " + last_name
print(full_name)