Plus operator
The plus operator is a language-defined operation, commonly performing numeric addition, string concatenation, or collection combination according to operand types.
Learn AI-Assisted Python Programming, Second Edition
- How it is used
- Uses + to put two strings together while reading and testing Python code.
- How deep it goes
- Demonstrates string concatenation and contrasts repetition without developing numeric behavior or implementation internals.
- Examples
- Uses sentence fragments and '-=' repeated five times as interactive Python examples.
- What you can do after
- Apply it in Python to join strings and test operator behavior at the Python prompt.
Read how Learn AI-Assisted Python Programming, Second Edition explains plus operator →
The Well-Grounded Rubyist, Fourth Edition
The Array#+ method is a Ruby method that returns a new array containing the elements of its operand arrays without mutating the receiver.
- How it is used
- Combines two arrays into a new array without changing the receiver.
- How deep it goes
- Demonstrates Array#+ with an irb example and contrasts its behavior with concat.
- Examples
- Combines [1, 2, 3] and [4, 5, 6], then checks that the original array is unchanged.
- What you can do after
- Apply Array#+ to combine arrays while keeping the receiver unchanged.
Read how The Well-Grounded Rubyist, Fourth Edition explains plus operator →
Related concepts
- bit shiftingcontrasts with · Bit shifting is a bitwise operation that moves the positions of an integer’s binary digits left or right by a specified count.
- concatenationused by · Concatenation is the operation of joining ordered sequences end to end to form a single sequence.
- stringused by · A string is a programming-language value representing an ordered sequence of characters or character units as text.
- pure functionkind of · A pure function is a function whose output is determined solely by its explicit inputs and whose evaluation has no externally observable side effects.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

