liveBook · Manning

Plus operator

The plus operator is a language-defined operation, commonly performing numeric addition, string concatenation, or collection combination according to operand types.

How 2 Manning books explain it

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

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.