Tricky python question 👀 #softwareengineer #computerscience #coding #stem #python

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

That's so counter intuitive, why wouldn't python re-initialize the function argument

BeeLightened
Автор

This is the reason the default lisr should be None.
def appendItem(itemName, itemList=None):
if itemList == None:
itemList = []
itemList.append(itemName)
return itemList

warthog
Автор

Wait WHAT? I mean like, they share the same memory or something? I'm confused

iaminfinityiq
Автор

Wait, the default parameter is static? Am I interpreting this wrong?

pchan
Автор

On site what of programme languages you have

matiamilosavljevic
Автор

Bro I still didn't understand how list1 has 1 and 3 list1 is already been executed right??

nandeeshkumarsh
welcome to shbcf.ru