Lecture Description
A list comprehension is a way to construct a list in Python using a single line of code. The pattern of creating an empty list, setting up a for loop, and then using several if-then clauses to determine which data should appear in the list can all be done in a single line in Python.
**************
To learn Python, you can watch our playlist from the beginning: www.youtube.com/watch?v=bY6m6_IIN94&list=PLi01XoE8jYohWFPpC17Z-wWhPOSuh8Er-
The dress worn by the instructor can be purchased at Shenova Fashion:
shenovafashion.com/collections/women-in-stem?utm_source=socratica&utm_medium=python_video&utm_campaign=May_2017
**************
To help us make videos more quickly, you can support Socratica at:
Patreon:
www.patreon.com/socratica
Socratica Paypal:
www.paypal.me/socratica
We also accept Bitcoin! :)
Our address is: 1EttYyGwJmpy9bLY2UcmEqMJuBfaZ1HdG9
Thank you!!
**************
You can also follow Socratica on:
- Twitter: @socratica
- Instagram: @SocraticaStudios
- Facebook: @SocraticaStudios
**************
Python instructor: Ulka Simone Mohanty
Written & Produced by Michael Harrison
Course Index
- Learn Python Programming with Socratica
- Python Hello World
- Python Strings
- Numbers in Version 2
- Numbers in Version 3
- Arithmetic in Python V2
- Arithmetic in Python V3
- Interactive Help
- Python Booleans
- Datetime Module (Dates and Times)
- Python: If, Then, Else
- Python Functions
- Sets in Python
- Python Lists
- Python Dictionaries
- Python Tuples
- Recursion, the Fibonacci Sequence and Memoization
- Python Random Number Generator: the Random Module
- CSV Files in Python
- A Random Walk & Monte Carlo Simulation
- List Comprehension in Python
Course Description
Our Python Tutorials will help you learn Python quickly and thoroughly. We start with "Hello World" and then move on to data structures (sets, lists, tuples and dictionaries). Next we'll cover classes, and give a variety of in-depth examples and applications.
Python is a clean and powerful programming language. You can use it to build websites, analyze data, write utilities, and create many other kinds of software. In this series we will teach everything you need to know to begin writing your own code in Python.