loops and lists the resulting lists a_low and a_high are exactly the same as those from the for loopbut the code is obviously much more compact to an experienced python programmerthe use of list comprehensions also makes the code more readablesince it becomes obvious that the code creates listand the contents of the list are usually easy to understand from the code inside the brackets the general form of list comprehension looks like newlist [expression for element in somelistwhere expression typically involves element the list comprehension works exactly like for loopit runs through all the elements in someliststores copy of each element in the variable elementevaluates expressionand appends the result to the list newlist the resulting list newlist will have the same length as somelistand its elements are given by expression list comprehensions are important to know aboutsince you will see them frequently when reading python code written by others they are convenient to use for the programming tasks covered in this bookbut not strictly necessarysince the same thing can always be accomplished with regular for loop traversing multiple lists simultaneously with zip sometimes we want to loop over two lists at the same time for instanceconsider printing out the contents of the a_low and a_high lists of the example above we can accomplish this using range and list indexingas in for in range(len(a_low))print(a_low[ ]a_high[ ]howevera built-in python function named zip provides an alternative solutionwhich many consider more elegant and "pythonic"for lowhigh in zip(a_lowa_high)print(lowhighthe output is exactly the samebut the use of zip makes the for loop more similar to the way we traverse single list we run through both listsextract the elements from each one into the variables low and highand use these variables inside the loopas we are used to we can also use zip with three listsl [ ] [ ]for in zip( )print( [ lists traversed with zip typically have the same lengthbut the function also works for lists of different lengths in this casethe for loop will simply stop when it reaches the end of the shortest listand the remaining elements of the longer lists are not visited