22. Python: List Comprehension, Frozensets and Assertion

2 months ago
88

* List comprehension offers a shorter syntax when you want to create a new list based on the values of an existing list.
* Frozen set is just an immutable version of a Python set object. While elements of a set can be modified at any time, elements of the frozen set remain the same after creation.
* The assert keyword lets you test if a condition in your code returns True, if not, the program will raise an AssertionError.

Loading comments...