DEV Community


Discussion on: 3 Tricky Python Nuances

djangotricks profile image
Aidas Bendoraitis

Great article. Makes sense.

However, it looks like you posted the list_append() examples without testing them beforehand, for example, these are equivalents:

print(list_append(5, 7))
print(list_append(element=5, input_list=7))

and you cannot call .extend() on an integer.

thejessleigh profile image
jess unrein Author

Oops, this is my bad retyping something from a screenshot of a slide, so I couldn't copy paste. Thanks for the catch! It should read print(list_append([5, 7])), as the example below it does, and I've amended the text to reflect this.