Python List

Python List

List data structure characteristics:
Append Vs Extend
Remove Vs Pop
List Comprehensions: Python provide a concise way to create lists without using map(), filter() or lambda functions. List comprehension statement consists of an expression followed by a for loop clause, then zero or more for loops or if clauses.
List as Stacks: Python list can be used as Stack i.e Last In First Out(LIFO) using pop() and append() functions.
List as Queues: Python list can be used as Queue i.e First In First Out(FIFO) using pop() and append() functions.
Create a Copy of List: List object can not be copied using assignment operator in Python. Assignment operator creates a reference to an existing list object. Copy of a list is sometimes needed so one list(copy) can be changed without changing the content of other list copy.

Create a reference to a existing list : Assignment operator can be used create a reference to an existing list object. If list is referenced, then any change in either of list variable will result in changes in the content of other list(because it is just a reference) as well.