Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13891

Is a Python list's += operator equivalent to append() or extend()? [duplicate]

$
0
0

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?


Viewing all articles
Browse latest Browse all 13891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>