How can I remember which of list.append and list.extend is which in Python? -


in python, lists have 2 methods adding elements end: "append" , "extend". 1 of them adds single element list, , other adds every element iterable end of list. know which? did know without having up? if so, please share secret remembering which?

at least me literal meaning clear enough make distinction between them.

one of dictionary definition append : add to end
1 of dictionary definition extend : stretch out on distance, space, time, or scope; run or extend between 2 points or beyond point


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -