Problem in python | Sololearn: Learn to code for FREE!


Problem in python

Why is the list name shown as none after appending an element. What does that that "None" mean? I am new to programming and I have just started with python. Please ignore any silly mistakes by me.

10/19/2020 3:42:48 PM


6 Answers

New Answer


You have to declare firstly your added_state variable as empty list.then assign to it state list .Or you have to remove assignment and append directly to state list with no need to added_state variable


You might find a good explanation here.


Thanks Avinesh & HBhZ_C


HBhZ_C thanx once again.


HBhZ_C can u plz tell me how will I declare my variable empty


You will declare an empty list .Here you declare added_state = [] with no value.Then you can append to it.