print(' 'python also has single way selection constructthe if statement with this statementif the condition is truean action is performed in the case where the condition is falseprocessing simply continues on to the next statement after the if for examplethe following fragment will first check to see if the value of variable is negative if it isthen it is modified by the absolute value function regardlessthe next action is to compute the square root if abs(nprint(math sqrt( )returning to liststhere is an alternative method for creating list that uses iteration and selection constructs the is known as list comprehension list comprehension allows you to easily create list based on some processing or selection criteria for exampleif we would like to create list of the first perfect squareswe could use for statementsq_list [for in range( )sq_list append( xsq_list [ using list comprehensionwe can do this in one step as sq_list [ for in range( )sq_list [ the variable takes on the values through as specified by the for construct the value of is then computed and added to the list that is being constructed the general syntax for list comprehension also allows selection criteria to be added so that only certain items get added for examplesq_list [ for in range( if ! sq_list [ this list comprehension constructed list that only contained the squares of the odd numbers in the range from to any sequence that supports iteration can be used within list comprehension to construct new list [ch upper(for ch in 'comprehensionif ch not in 'aeiou' review of basic python