Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 1.89 KB

lesson3.md

File metadata and controls

44 lines (29 loc) · 1.89 KB

Week 11 Lesson 3

Functional Programing in Python, Part II

In this lesson, you will learn an alternative approach to functional programming in Python, that is specifically encouraged in Python3, iterators and comprehensions. First, you will learn about list comprehensions, which are an easy way to construct lists of items. Second, you will learn about iterators, which enable functional programming by simplifying the process of moving through items of data in a collection, like a list. Finally, you will learn moe about these constructs through a worked file system example.

###Objectives ### By the end of this lesson, you will be able to:

  • Understand the iterator concept and how they can be broadly applied.
  • Understand how to use a list comprehension to make a new list.
  • Understand how to use an if clause in a list comprehension.
  • Understand other comprehensions like dictionary or set.

Time Estimate

Approximately 3 hours.

Readings

Optional Additional Readings####

Assessment

When you have completed and worked through the above readings, please take the Week 11 Lesson 3 Assessment.