According to the docs:
list.append(x): Add an item to the end of the list
So, if I do:
list = []
list.append("banana")
print list[0] --> which is suppose to print the FIRST item of the list
> banana
So far so good, however if now I append another item:
list.append("apple")
print list[0]
apple
Wasn't it suppose to append to the END of the list? How do I keep the order of the list when appending? How should I print the first and last items of the list -- in the order they were added to it?
Thanks
listas a variable name. However, you must be missing something in your question. Append add's elements to the back of the listlistin your code, correct? Big no-no