In Python, strings are immutable, which means you cannot modify them after creating them. To “append” to a string, you create a new string by combining the original string with the additional content.
Here are four ways to append a string:
- String Concatenation with +
- Using a string.join() (Efficient for multiple appends)
- Using the += Operator (Extending a string)
- String formatting (Using f-strings or string.format())
Method 1: String Concatenation with +
The + operator explicitly allows us to concatenate or append two strings. It creates a new string each time. This approach is helpful when we need to combine multiple strings into a single expression.
first_name = "Millie"
last_name = "Brown"
print("The first name: " + str(first_name))
print("The middle name : " + str(last_name))
# Using + operator to append one string to another
final_name = first_name + last_name
# Printing the result
print("The appended string is: " + final_name)
# The first name: Millie
# The middle name : Brown
# The appended string is: MillieBrown
Method 2: Using string.join()
If you are looking for efficient multiple appends, create a list, append the strings to it, and use the string.join() method to merge them to get the final string.

This approach is especially helpful in building large strings incrementally (e.g., in loops).
first_name = "Millie"
middle_name = "Bobby"
last_name = "Brown"
# Create a list of Strings
listOfStrings = [first_name, middle_name, last_name]
final_name = "".join(listOfStrings)
# print the final result
print("The appended string is: " + final_name)
# The appended string is: MillieBobbyBrown
Method 3: Using the += Operator
The += operator creates a new string and assigns it back to the variable. If you want to append a new string, you can do so like s += “new part”.
In the above illustration, we first defined a name and, using the += operator, appended new names to the original name. The final string is the appended string.
name = "Millie" name += " Bobby" name += " Brown" print(name) # Millie Bobby Brown
Method 4: String formatting
Using string formatting, we can embed variables or expressions into a new string.
Using f-strings
As of version 3.6, f-strings provide a comprehensive new method for formatting strings. Our goal is to format strings in a way that results in a concatenated final string.
first_name = "Millie"
last_name = "Brown"
# use f-strings to append the strings.
final_name = f"{first_name} {last_name}"
# print result
print("The appended string is: " + final_name)
# Output: The appended string is: Millie Brown
Using string.format()
The string.format() method is another way of formatting, where we use placeholders to insert variables, and the final output is a concatenated string.
first_name = "Millie"
last_name = "Brown"
print("The appended string is: {} {}".format(first_name, last_name))
# Output: The appended string is: Millie Brown
That’s it.




