您在這裡

String operations

23 二月, 2015 - 11:56

The + operator works with strings, but it is not addition in the mathematical sense. Instead it performs concatenation, which means joining the strings by linking them end-to-end. For example:

>>> first = 10>>> second = 15>>> print first+second25>>> first = '100'>>> second = '150'>>> print first + second100150

The output of this program is throatwarbler.