Python‎ > ‎operator‎ > ‎

operator.iconcat()

http://www.adilwaseem.com/

Return 
Return with value of one added by other in string or sequence.

Syntax
a = iconcat(a, b)
__iconcat__

Parameters
a,b=string or iterable

Import module
Importing module is required in the Shell window and the Editor window.

Examples
The method come up with a+b.
 >>>import operators
>>> a="44"
>>> b="56"
>>> operator.iconcat(a,b)
'4456'

The character string are joined.
 >>> 
>>> a="Python"
>>> b=" Research Centre"
>>> operator.iconcat(a,b)
'Python Research Centre'

a+=b
return with the value equal to iconcat() method.
 >>> a="44"
>>> b="56"
>>> a+=b
>>> a
'4456'

Return with the value.
 >>> a+=b
>>> a
'Python Research Centre'

operator.__iconcat__(a,b)
The method also produces same value.
  >>> a="44"
>>> b="56"
>>> operator.__iconcat__(a,b)
'4456'

Comments