W3docs

How do I append one string to another in Python?

You can use the "+" operator to concatenate two strings in Python.

You can use the "+" operator to concatenate two strings in Python. Here's an example:

Summation of strings in Python

python— editable, runs on the server
Info

Watch a video course: Python - The Practical Guide

You can also use the += operator to append one string to another:

Summation of strings in Python using += operator

python— editable, runs on the server

or the join() method of the first string, passing the second string as an argument:

Join multiple strings in Python

python— editable, runs on the server

Note that join() method expects a list of strings, so you have to pass a list containing the two strings you want to join.