PS: These are notes, there could be grammar error and spelling errors.
For loop over a list goes as follows:
range function creates lists based on parameter passed in function``py
Just like break is use to break loop, continue is used to continue loop towards iteration without further execution A combined example.
Few other things with lists:
Same way we have
.remove using append we can append another list to existing list as a element of the list
There is another method call
.extend which would add element of second list as element of new list
Using lists as stack and queue
Stacks work as LIFO(Last In First Out) and queue work on FIFO(First In First Out)
Note: .pop removes element and return removed element while append just add element doesn’t returns anything