On this page
operator.concat
Prev: operator.call | Up: operator | Next: operator.contains
Rel: operator.abs, operator.add, operator.and_, operator.attrgetter
Ref: docs.python.org — operator.concat
Tags: #public #python3 #stdlib #operator
Import
import operator
from operator import concat
Signature & Overview
operator.concat(a, b, /)
Same as a + b, for a and b sequences.
Usage
import operator
assert operator.concat([1, 2], [3, 4]) == [1, 2, 3, 4]
Gotchas
- Sequences only: Raises
TypeErroron numbers (unlikeoperator.add).
REPL Inspect
from operator import concat
help(concat)
Linked from
Related notes
- tuts/python3/stdlib_module/operator/call Linked here; links to this page; shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/contains Linked here; links to this page; shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/operator/abs Linked here; shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/add Linked here; shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/and_ Linked here; shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/attrgetter Linked here; shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/countOf shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/delitem shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/eq shared tags: #operator, #stdlib