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?
In python += on a list is equivalent to extend
method on that list.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments