¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita0
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. https://code.sololearn.com/c89McJc8Up4f/?ref=app
6 Respuestas
+ 2
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
+ 1
You might find a good explanation here.
https://stackoverflow.com/questions/16641119/why-does-append-always-return-none-in-JUMP_LINK__&&__python__&&__JUMP_LINK
+ 1
HBhZ_C thanx once again.
0
HBhZ_C can u plz tell me how will I declare my variable empty
0
You will declare an empty list .Here you declare added_state = [] with no value.Then you can append to it.