The same 3 types that share the indexing operator (str
, bytes
, and arrays) also share the ability to concatenate
two values. The ++
operator is used for that purpose:
Note that the concatenation operator does not work for tuples, which are free-standing heterogenous objects. Items inside a tuple can be concatenated normally, however: