empty_list = [] first_var = 1 filled_list = empty_list.append(first_var) # here it will append to empty_list and append returns None which is assigned to filled_list print(filled_list) print(empty_list)
Output:None
[1]
>>>
So your code is equivalent toempty_list = [] first_var = 1 empty_list.append(first_var) filled_list = None print(filled_list)
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs