I need HELP!!

WHAT DOES THE .append thing do?

You are viewing a single comment. View All

You should really post more meaningful questions, like what language are you using, where have you seen the append function etc. Remember repl.it is a special platform for many languages not just python so be more specific. Now I'm assuming you're using python and the .append() function is used on list.

Let's suppose you have a list named l which is basically [5, 8, 9]. Just suppose, it can be anything.

Now if you do l.append(7) it becomes [5, 8, 9, 7].


Hi @Lanna -- @TheDrone7 is correct, you need to write your questions so people can understand what you are asking about.

Reading this post will help you ask better questions: https://repl.it/talk/ask/Guide-to-Asking-Coding-Questions/7251


@TheDrone7 So you mean that the .append adds a number to the end of the list?
Sorry for being unclear, I was in a rush.


@Lanna yes, it does and ok, but be sure to be more specific from the next time, also for such quick reference you can refer to python docs - https://docs.python.org/3/


@Lanna .append can also work for text too (eg: names). For more detail, you can look at my posted comment.