Deleting Elements of a Python List while Iterating

What will we cover in this tutorial? Step 1: What happens when you just delete elements from a Python list while iterating over it? Let’s first try this simple example to understand the challenge of deleting element in a Python list while iterating over it. Now, looking at this piece of code, it would seem … Read more

List Comprehension in Python made Easy with Comparisons

What will we cover in this tutorial? Step 1: Understand what is list comprehension On wikipedia.org it is defined as follows. A list comprehension is a syntactic construct available in some programming languages for creating a list based on existing lists.  Wikipedia.org Then how does that translate into Python? Or is it, how does Python translate that into code? If this is … Read more