Operators
Subtopics
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:
Input
Run
Output Objects
Press the 'Run' button to evaluate the input
Input
Run
Output Objects
Press the 'Run' button to evaluate the input
Input
Run
Output Objects
Press the 'Run' button to evaluate the input
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:
Input
Run
Output Objects
Press the 'Run' button to evaluate the input