##### List Comprehension with if and else statements

It is fairly common to find list comprehension examples with a single if statement. However, you can have multiple evaluations

Example:
Given a list of numbers, perform a list comprehension such that all even numbers are squares and all odd numbers remain the same.

sample_list = [ 1, 2, 3, 4, 5, 6 ]

[ x**2 if x%2 == 0 else x for x in sample_list  ]

[1, 4, 3, 16, 5, 36]