Intermediate Python Puzzle #1: List Comprehensions - Powerful Syntax for Building Lists in Python

Veröffentlicht am: 05 Januar 2021
auf dem Kanal: Kris Jordan
1,578
47

Python's List Comprehensions are a beautiful syntactical concept that help you to build lists from iterables (ranges, other lists, anything you can use in a for/in loop, generally) very succinctly. Filter and transform items in the resulting list with ease. This tutorial introduces list comprehensions in a puzzle problem that gives you the opportunity to think through some examples before revealing how it works.

0:00 - Introduction
0:20 - Python List Comprehension Example Puzzle
1:32 - Rewriting a for in loop to a list comprehension in Python
3:54 - Using a conditional in a list comprehension to filter items from the input
6:29 - Tracing through a list comprehension example with a conditional filter and transformation
8:25 - Make list comprehensions easier to read by using simple expressions
10:14 - Practice list comprehension problems to trace through
11:40 - List comprehensions with string values and method call expressions


Auf dieser Seite können Sie das Online-Video Intermediate Python Puzzle #1: List Comprehensions - Powerful Syntax for Building Lists in Python mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Kris Jordan 05 Januar 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 1,578 Mal angesehen und es wurde von 47 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!