

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:
➢➢➢➢➢➢➢➢➢➢
We recommend:
Python Cookbook, Third edition from O’Reilly
The Mythical Man Month – Essays on Software Engineering & Project Management
Shop Amazon Used Textbooks – Save up to 90%
➢➢➢➢➢➢➢➢➢➢
Subscribe to Socratica:
This video was made possible with the support of our Patrons on Patreon! We wish to particularly thank our VIP Patron Vishal Shah. Thank you for your generous support, Vishal!
To support more videos from Socratica, visit
Socratica Patreon
Socratica Paypal
We also accept Bitcoin! 🙂
Our address is: 1EttYyGwJmpy9bLY2UcmEqMJuBfaZ1HdG9
➢➢➢➢➢➢➢➢➢➢
Python instructor: Ulka Simone Mohanty
Written & Produced by Michael Harrison
FX by Andriy Kostyuk
The dress worn by the instructor can be purchased at Shenova Fashion:
It's official! The Socratica Python Kickstarter was a success! Thank you to all of our supporters. Because of you, many more Python videos coming soon!! 💜🦉
Your presentation is funny and helpful. Thanks for the videos
1:47 because Guido did not ask you.
I have done many scripts for work and personal use. But, when I show compact 1 liner code to my lady, she is still not impressed.
you are amazing !
i think this lady has elite sense of humor
Codecademy skimps on details in some of their lessons. You've covered what they missed! Thank you so much.
4:47 I want both year and title is it possible?
It was awsome!!!
U guys are awsome😚
This is exactly what i was looking for. Thanks for the videos!
Thank you Trinity
makes me to watch again and again .this type of teaching never in the history of teaching
Finally found someone who cares about my sanity .
thank you thank you thank you thank you so much i was struggling to do the matrix binary exponentiation by pisano method and i needed exactly this video
Your voice is beautiful as your teaching techniques…
Best audio effect for the tutorials like this.awsome.
"It's now TIME for Python to SHINE, and save TIME with a single LINE"
I love it madam
comment me if u paused video to see the movies names
1:52 why on why did they not use the intergalactic expression for e
Hahaha.. append yourself to our list of subscribers. Definitely subscribing.
i felt was watched some extraterrestrial subjected movie.Thank u for information))
that was amazing tutorial i will definitely hit that i like it and without any doubts, I'll subscribe your channel
"append yourself to our list of subscribers"…
Simply clear as water. Perfect.
Thanks so much. i love the way you make complex python topics easy to understand
Here comes your new subscriber with list comprehension. Thank you, for such wonderful explanation.
This is just Amazing. Thanks
Subscriber.Insert(0,Hussain)
your videos is so informetive :)! i just found my new favoirte channle on youtube thank you for this video
That's just awesome.
Because of this tutorial, I earned a lot of respect in my company, everyone says my code is beautiful! Thank you!
What if I have 4 different variables like x, y, z, and j and I want it to print ['x', 1], ['x', 2], ['x', 3], ['x', 4], ['x', 5], ['x', 6], ['y', 1], ['y', 2], ['y', 3], ['y', 4], ['y', 5], ['y', 6], ['z', 1], ['z', 2], ['z', 3], ['z', 4], ['z, 5], ['z', 6], ['j', 1], ['j', 2], ['j', 3], ['j', 4], ['j, 5], ['j', 6]] how do I do this?
nice tutorials
very instrucitve, thanks
Man let's make them famous, share share share!
Socratica=[me for me in Subscribers if me.liked]
I should say this is what i always looking for…straight to the point, no bull shit. Thank you for your efforts. Awesome video.
Love it 🥰
i love this. I am learning python all alone. This video has removed confusion from my head.
I swear you made so many nerds happy with this series. A beautiful woman explains code in a rational way.