Aug-13-2018, 04:26 PM
Hello everyone,
I recently registered in order to ask for help. Being a total newbie, I decided to practice with list operations, and I wanted to create a very simple program, simply using "append" and "pop".
The bad news is, though, I'm not getting the output i wanted: while it should be [1, 2, 4, 8, "num"] and [1, 4, 8], what I get is:
None ; 2
What am I doing wrong?
Thanks in advance for your generous help, dear coders!
I recently registered in order to ask for help. Being a total newbie, I decided to practice with list operations, and I wanted to create a very simple program, simply using "append" and "pop".
1 2 3 |
random_list = [ 1 , 2 , 4 , 8 ] print (random_list.append( "num" )) print (random_list.pop( 1 )) |
None ; 2
What am I doing wrong?
Thanks in advance for your generous help, dear coders!