list-copy function using None : None : Data Type PYTHON TUTORIALS


PYTHON TUTORIALS » Data Type » None »

 

list-copy function using None


def f(a, mylist=None):
    if mylist is None:
        mylist = []
    mylist.append(a)
    return mylist



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Data Type
» None