This repository displays my personal study notes across various tech subjects, showcasing my continuous learning and expertise in all things related to computer science.
# The Syntax
newlist = [expression for item in iterable if condition == True]
For example :
lst = [x ** 2 for x in range (1, 11) if x % 2 == 1]
here, x ** 2 is output expression,
range (1, 11) is input sequence,
x is variable and
if x % 2 == 1 is predicate part.