concatenation

Joining two strings or two lists end to end with +, as in "Hello, " + name.

In more detail

Both sides must be the same kind of sequence: "Age: " + 30 raises TypeError, so convert with str() or use a format string instead. Concatenation builds a new object; list append changes an existing list.

Example

"ab" + "cd"   # "abcd"

Related terms

Taught in

References