Python List Comprehensions Made Easy!!

Поделиться
HTML-код
  • Опубликовано: 13 июн 2024
  • In this video, I'll give you a hack to never forget Python list comprehensions again.
    We'll look at a simple example to show how list comprehensions work, then we'll shift to a more practical example and how you would use it in a real-life scenario.
    Angela Yu 100 Days of Python Udemy Course (5 Star) - geni.us/wNZRxMh
    Up-to-date Udemy Deals - travis.media/udemy
    Join the Travis Media community - travis.media/community
    TImestamps
    00:00 Intro
    00:55 What is a Python list comprehension?
    01:12 Simple example
    02:14 The magic formula
    03:43 Adding a condition
    04:04 A Real Example
    10:52 Review
    11:11 Outro
    ** Career Path Coding Tracks **
    Web Developer - geni.us/jBigBd
    Software Engineer - geni.us/AbMxjrX
    Machine Learning - geni.us/GporLlT
    Python Developer - geni.us/tv2FJBU
    DevOps Engineer - geni.us/MgHtJ
    ** My Coding Blueprints **
    Learn to Code Web Developer Blueprint - geni.us/HoswN2
    AWS/Python Blueprint - geni.us/yGlFaRe
    Both FREE in the Travis Media Community
    ** I write regularly **
    travis.media
    ** FREE EBOOKS **
    📘 travis.media/ebooks
    LET'S CONNECT!
    📰 LinkedIn ➔ / travisdot. .
    🐦 Twitter ➔ / travisdotmedia​
    🙋🏼‍♂️ Website ➔ travis.media
    #pythonprogramming #pythontutorial #learntocode #pythonforbeginners
    ** Some of the links in this description may be affiliate links that I may get a little cut of. Thank you.
  • НаукаНаука

Комментарии • 23

  • @henrikibsen1009
    @henrikibsen1009 5 месяцев назад +3

    Yes, this is one of these videos I'll come back to over and over and over again!

  • @joreilly
    @joreilly 7 месяцев назад +4

    Lambda and list comprehension please. Also continue with these short conceptual vids. This one was great 👍

  • @SRXclamation
    @SRXclamation 10 месяцев назад +4

    Travis I really appreciate your effort on here. I'm a relatively new student to programming and a few months back I was definitely questioning this path and losing motivation daily, but then I came across one of your videos and your enthusiasm/ practical optimism were very refreshing! I now feel that, whatever my goals become as I continue to progress, with discipline and patience I can become a competent and knowledgeable part of this community. SO thank you!

    • @Fanta666
      @Fanta666 10 месяцев назад

      I'm also a noob, do you want to collaborate or at least learn together? I'm in a few programming discords.

    • @lovepreetSingh-rx4vz
      @lovepreetSingh-rx4vz 6 месяцев назад

      I am in if you guys are making discord i think we can learn from each other i am into python mostly doing scraping work

  • @mike220_8
    @mike220_8 2 месяца назад

    This was the video I was looking for - great job breaking things down. Also loved how you gave a foundational example, then a real world example. Subscribed!

  • @tacoma87x
    @tacoma87x Месяц назад

    Finally I understand wtf list comprehension is. Thank you for this video.

  • @AhmedAbdullWahab-kl7uk
    @AhmedAbdullWahab-kl7uk 10 месяцев назад +2

    Thank you,
    Please continue making this type of videos.

  • @lauranyaaga4436
    @lauranyaaga4436 2 месяца назад

    You have really made this simpler 😊.
    Thank you so much👍

  • @marcosdossantos3749
    @marcosdossantos3749 Месяц назад

    Perfection! I will definitely make the 100 days project course!

  • @shashankbheemanapalli4333
    @shashankbheemanapalli4333 9 месяцев назад +1

    Please do more conceptual videos like these. Thank you

  • @spencersedano
    @spencersedano 9 месяцев назад +1

    Great explanation about list comprehension. I often do Codewars and I see that many people use it. I didn't understand it much but now it's clear!

  • @jiapatil130
    @jiapatil130 7 месяцев назад

    Hey Travis ! I had a hard time understanding list comprehension and your video was a life saver for me. Thank you so much for your effort :)

  • @marie.rousseau
    @marie.rousseau Месяц назад

    "But this is clean to me" got you a sub 😂

  • @ghostrider5236
    @ghostrider5236 Месяц назад

    thanks sir

  • @1997origami
    @1997origami 9 месяцев назад

    Thank you so much, I am taking Crush Course on Python by Google, and it was so difficult to understand the syntax of this subject, thank you so much for explaining it in a way that anyone can understand it, not only programmers

  • @Fanta666
    @Fanta666 10 месяцев назад

    Id love a video on using lambdas in list comprehension

  • @NoNo-nr2xv
    @NoNo-nr2xv Месяц назад

    Still don't get it.
    The variable "year" is both the new item and the iterator, so how is it not overwriting and infinitely iterating as new vaues are produced.
    Also if the argument "for" is still used, just in square brackets, surely this is still just as computationally heavy as a common for loop?

  • @wombozombo
    @wombozombo 10 месяцев назад +1

    How's the community going so far?

  • @MegaDonaldification
    @MegaDonaldification 10 месяцев назад +3

    Why can't you look for a project to invest your time in rather than spend time on syntax since you say you are a renowned developer. You could be doing projects in django, fastapi, etc,.

  • @laodrofotic7713
    @laodrofotic7713 2 месяца назад

    crap