• Online, Self-Paced
Course Description

Explore how iterating over elements using for loops can be controlled using the break and continue statements in Python. Creating sequences from other sequences using comprehensions is also covered in this 9-video course. Key concepts covered here include how to terminate a for loop when a specific condition is met using the break statement; learning how the break statement affects the code in the else block of a for loop; and observing how to skip an iteration of a for loop when a specific condition is met using the continue statement. Next, learn how to use the continue statement along with the break statement within the same for loop; learn the fact that no action is performed under specific conditions by using the pass statement; and create a list out of the contents of another list using a comprehension. Finally, you will learn about conditions in list comprehensions in order to filter elements used in the source list and to define values in the newly created list.

Learning Objectives

{"discover the key concepts covered in this course"}

Framework Connections

The materials within this course focus on the NICE Framework Task, Knowledge, and Skill statements identified within the indicated NICE Framework component(s):

Specialty Areas

  • Software Development