Skip to content

List Comprehension

List comprehension is a way to create a new list from an existing range or or other iterables

A python list comprehension consist of brackets that contain expression along with for loop and conditions(if needed)

syntax

[expression for loop  <condition>]