Python lists have a +=
operator as well as append
and extend
methods.
If l
is a list, is l += ...
equivalent to l.append(...)
, l.extend(...)
, both, or neither?
Python lists have a +=
operator as well as append
and extend
methods.
If l
is a list, is l += ...
equivalent to l.append(...)
, l.extend(...)
, both, or neither?