List Comprehension || Python Tutorial || Learn Python Programming

Поделиться
HTML-код
  • Опубликовано: 15 янв 2025

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

  • @Socratica
    @Socratica  2 года назад +10

    Wear a Socratica Python shirt for good luck coding: shop.socratica.com/products/python-by-socratica

  • @borazan
    @borazan 3 года назад +423

    "So please, append yourself to our list of subscribers" is pure gold...

    • @somtovitus
      @somtovitus 3 года назад +2

      That was the point I liked the video

    • @Cmdrlucky8
      @Cmdrlucky8 2 года назад +1

      @@somtovitus +1

    • @Zeddy27182
      @Zeddy27182 2 года назад +6

      likes += 1

    • @lil_uji_goated
      @lil_uji_goated Год назад

      @@Zeddy27182 likes++; is actually better

  • @pencilmein6646
    @pencilmein6646 6 лет назад +493

    "Python cares about your sanity" love this xD

  • @Socratica
    @Socratica  5 лет назад +139

    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!! 💜🦉

    • @tomtomski4454
      @tomtomski4454 5 лет назад +3

      I came over this video by chance and I am delighted by your ability to explain things as clearly as possible. Also I really appretiate great vocal. Thanks!

    • @robertlee6529
      @robertlee6529 5 лет назад +1

      Looking forward to it!

    • @anupsagar1990
      @anupsagar1990 4 года назад +2

      4 months already, where is it🤷

    • @zackalcaina1896
      @zackalcaina1896 3 года назад

      You guys/girls/...are soooo goood. I came across by coincidence and i was absolutely shocked by this Peculiar way to explain it. You nail it!

  • @Mady2207
    @Mady2207 7 лет назад +312

    Seriously, you guys have changed the way to teach. Its like I'm watching python scifi movie. You guys are rocking. Thank you for complete team for marking these beautiful tutorials

  • @oozzyy-rly
    @oozzyy-rly 5 лет назад +94

    "Python cares about your sanity", should be the motto of Python :D

    • @jhoniemusic
      @jhoniemusic 4 года назад +1

      Hahahahaha this makes my day, but honestly.... Why not

    • @sircosm
      @sircosm 3 года назад

      Actually, it doesn't compared to some of the other languages.

    • @zakiruzzama1822
      @zakiruzzama1822 3 года назад +1

      Ugh I'm the 70th like. Should have left it at 69

  • @SustainedFuture
    @SustainedFuture 5 лет назад +74

    For those of you playing along at home: If you're enjoying these tutorials as much as I am but dislike typing in long lists and tuples as much as I do, here are the data sets for your cut-and-paste pleasure. Extra typos provided free of charge.
    movies1 = ["Star Wars", "Gandhi", "Casablanca", "Shawshank Redemption", "Toy Story", "Gone With the Wind",
    "Citizen Kane", "It's a Wonderful Life", "The Wizard of Oz", "Gattaca", "Rear Window", "Ghost Busters",
    "To Kill a Mockingbird", "Good Will Hunting", "2001: A Space Odyssey", "Raiders of the Lost Ark", "Groundhog Day",
    "Close Encounters of the Third Kind"]
    movies2 = [("Citizen Kane", 1941), ("Spirited Away", 2001), ("It's a Wonderful Life", 1946), ("Gattica",1997), ("No Country for Old Men",2007),
    ("Rear Window",1954), ("The Lord of the Rings: The Fellowship of the Ring", 2001), ("Groundhog Day", 1993),
    ("Close Encounters of the Third Kind", 1977), ("The Royal Tenenbaums", 2001), ("The Aviator", 2004), ("Raiders of the Lost Ark", 1981)]

  • @user-cd6vy2jg6f
    @user-cd6vy2jg6f 7 лет назад +129

    I absolutely cannot believe this channel exists. In-depth content presented so compellingly. Amazing

    • @Socratica
      @Socratica  7 лет назад +19

      That's so kind of you to say, thank you! We're so glad you're watching. :)

  • @MoysesGurgel
    @MoysesGurgel 7 лет назад +79

    Hello, Socratica! I am a Python self-taught and you are being a precious help in this learning process. I have faced some difficulties and several times I was about to give up but when this is almost happening there is something that suddenly gives me the courage to move on. Now I have the fortune to discover your magnificent channel and so continue learning Python with your wonderful tutorial. I feel that this is what I needed to fulfill my dream of becoming a programmer one day. When that happens I will give the name Socratica to the first program that I will develop in your honor. Thank you, my friends!

    • @Socratica
      @Socratica  7 лет назад +22

      Thank you for this amazing comment. We are thrilled to play a small part in your journey! Stay the course, my friend.

    • @georgiosdoumas2446
      @georgiosdoumas2446 4 года назад +13

      So after 3 years of typing this comment, have you become a professional developer?

    • @gauravnegi4312
      @gauravnegi4312 4 года назад +5

      @@georgiosdoumas2446 I knew someone would ask this.

    • @realnice3672
      @realnice3672 4 года назад

      @@gauravnegi4312 lol

    • @faresalouf
      @faresalouf 3 года назад

      Everyone is self taught..

  • @latavish
    @latavish 7 лет назад +208

    OMG I just love the python series. I would pay cold hard cash for more in-depth computer science videos like this.

    • @Xardas_
      @Xardas_ 4 года назад +1

      likewise

    • @orion_222
      @orion_222 4 года назад +5

      microwave ur cash b4 u give it to me

  • @papa515
    @papa515 7 лет назад +20

    One of the best 'list comprehension' explanations I've seen.

  • @sathvikmalgikar2842
    @sathvikmalgikar2842 2 года назад +1

    you are causing a revolution in the way people learn stuff.

  • @souravdas1983
    @souravdas1983 2 года назад +1

    You guys do a brilliant job in democratising education. Many Thanks!

    • @Socratica
      @Socratica  2 года назад

      Thank you for your kind words and generous donation!

  • @minsun7025
    @minsun7025 2 года назад +1

    Yo what is this gold the style is amazing!

  • @n0block
    @n0block 7 лет назад +8

    The people making these videos are absolutely genius.

  • @kaug5570
    @kaug5570 6 лет назад +1

    Probably the best Python tutorial series on RUclips.

  • @andrewstribling4385
    @andrewstribling4385 2 года назад +1

    I was struggling with this all day until I saw this. Needless to say I will be coming back for more tutorials. thank you!

  • @hrishikeshparab1236
    @hrishikeshparab1236 Год назад +2

    reading about list comprehension seemed complex and difficult to understand but Socratica cleared this topic in minutes....wow thannk you!

    • @Socratica
      @Socratica  Год назад +2

      This is so great to hear!! 💜🦉

  • @evemarietou
    @evemarietou 3 года назад +6

    I was having a difficult time understanding list comprehensions in the Udemy python course I'm taking, so I came here. This is my first time watching one of your videos, and it was sooo helpful. I particularly appreciated the use of an engaging, real-world example of list comprehensions involving tuples (i.e., movies from the year 2000). Quadruple points for the sci-fi aesthetic!

  • @hayfordadjavor18
    @hayfordadjavor18 7 лет назад +1

    Socratica has just revolutionized the learning experience; l'm indeed grateful to the team! You rock, Socratica!!

  • @whatsnewnow4469
    @whatsnewnow4469 4 года назад +1

    Best audio effect for the tutorials like this.awsome.

  • @singsai
    @singsai 7 лет назад +1

    I'm strictly Javascript these days, but I am so happy I stumbled on your videos tonight. You're hilarious and enlightening. I have appended my name to your subscriber list.

  • @benjaminauer8637
    @benjaminauer8637 4 года назад +2

    this is my favorite coding tutorial of all :)
    no trying to be an entertainer or showman, no blabbering about coworkers and their names and interests.
    straight facts. and a sexy voice that reminds me of spymovies :)

  • @AnkitSingh-xg4qy
    @AnkitSingh-xg4qy 3 года назад

    This channel is a hidden gem, Since two days my productivity level is going higher n higher...

  • @alaeddinetmar5714
    @alaeddinetmar5714 4 года назад +1

    Because of this tutorial, I earned a lot of respect in my company, everyone says my code is beautiful! Thank you!

  • @boundto484
    @boundto484 6 лет назад +25

    Finding this series has made me realize that every other channel that teaches Python is doing it wrong. This series is incredible, and I would be more than willing to buy these videos.

  • @paideepak30
    @paideepak30 3 года назад

    Thanks!

    • @Socratica
      @Socratica  3 года назад

      Oh my goodness, Thank You so much for your kind support!! 💜🦉

  • @iggymach
    @iggymach 4 года назад +1

    Love this teaching style Lol.
    30 seconds in and I like the channel already.

  • @NodeLedge
    @NodeLedge 2 года назад +1

    I absolutely love this videos

  • @TruSegone
    @TruSegone 4 года назад +19

    "It's now TIME for Python to SHINE, and save TIME with a single LINE"

  • @ProfessorsChoice1
    @ProfessorsChoice1 4 года назад +2

    Here comes your new subscriber with list comprehension. Thank you, for such wonderful explanation.

  • @vasfigumus7728
    @vasfigumus7728 7 лет назад +1

    Keep them coming. This can't fail.

  • @rupakale7688
    @rupakale7688 4 года назад +1

    when i watch your video i get next level of energy, thank you socratica for your wonderful video

  • @bertrandrussell3422
    @bertrandrussell3422 2 года назад +1

    this style is so cool...and sarcastically funny at the same time!😂😂 the examples and explanations themselves are amazing, thank you guys for creating such an interesting video tutorial !!

  • @nehajha5393
    @nehajha5393 4 года назад +2

    Teaching is an art and you possess this skill :)

  • @jarvisnederlof35
    @jarvisnederlof35 6 лет назад +1

    Excellent Videos, the story telling effect, the pauses, the content, everything.

  • @selinalkan1009
    @selinalkan1009 3 года назад

    I have been teaching myself Python over a popular website, but their exercises are very few, and I find it hard to come up with ideas to practice on my own at this stage. This short video has taught me much more than what I have tried to learn for hours on that website! Kudos to Socratica!

  • @mr.crowley4099
    @mr.crowley4099 4 года назад +2

    Hahaha.. append yourself to our list of subscribers. Definitely subscribing.

  • @martekindustries69
    @martekindustries69 4 года назад +2

    I love these videos so much. Lots of information packed in small videos with out other unnecessary information. I want socraticas voice for my Google home too lol

  • @Yasharvl
    @Yasharvl 4 года назад +2

    Thank you, I`ve just deleted two whole functions and instead added three letters to my list comprehension! :D so happy about it!

  • @kwubegharitony2044
    @kwubegharitony2044 4 года назад +1

    i love this. I am learning python all alone. This video has removed confusion from my head.

  • @hammerhead351
    @hammerhead351 5 лет назад +2

    I love these videos! The information is top shelf, and the humor is extra EXTRA dry!

  • @NavedAhmadX
    @NavedAhmadX 7 лет назад +2

    One of best channels. Thanks for sharing the knowledge. Big Fan.

  • @brianbreeden8864
    @brianbreeden8864 5 лет назад +2

    I have been struggling with this topic for the last day or so. This video was very helpful in learning this concept, thank you for making it!

  • @TheDuckofDoom.
    @TheDuckofDoom. 7 лет назад +39

    The double asterisk "**" is used for exponents because in general purpose programming the circumflex or caret "^" was already taken for "start of line" in file parsing, eg regex and for the bit-wise OR operator in C. Old languages didn't have any exp operator because it isn't/wasn't a primitive hardware operation in most CPUs thus exponentiation is provided via a libraries or custom functions.
    More semantically speaking in various syntax that use the circumflex or caret "^" such as LaTex or MathJacks it actually represents a shift to superscript not necessarily exponentiation (in turn superscript when used with a number is what formally means exponent, but superscript is also used for sigma style sum notation and integral notations.)
    In addition Python borrows heavily from C conventions and part of the advantage of Python is that it can interact with C more cleanly than many other languages. No need to reinvent the wheel or create mental syntax switching problems for the developer using both languages or simply using regex syntax.

  • @leadmealmighty8426
    @leadmealmighty8426 3 года назад

    This channel is so underrated it deserves more views and subscribers

  • @lidziyatarasenka4140
    @lidziyatarasenka4140 2 года назад +1

    Such a great channel.

  • @NikoxD93
    @NikoxD93 7 лет назад +9

    I love using list comprehensions, so neat! :)

  • @berinchandar
    @berinchandar 7 лет назад +6

    Just watched one video in this series and that made me to complete the whole series in one shot. It would be better if u upload more videos without taking much time. Awesome work.

  • @Jasoncalvo7
    @Jasoncalvo7 6 лет назад +4

    I am really impressed by this tutorial. I have ADD and it kept my attention lol. Thnk you for making this and I will now be using socratica for my coding studies.

  • @rogerwilko3717
    @rogerwilko3717 4 года назад +1

    Finally a video that explained all the details I needed! Thank you!

  • @bulentoral1177
    @bulentoral1177 3 года назад

    Your videos are awsome. FAST, CLEAR,UNDERSTANDABLE

  • @EsotericEchoesTailored
    @EsotericEchoesTailored Год назад +2

    It's purely amazing how beautifully it is explained. I just subscribed to this channel. Congrats for making such beautiful and informative content and thank you!!

    • @Socratica
      @Socratica  Год назад +1

      We're so glad you've found us! Thank you for your kind words. 💜🦉

  • @andreafranceschini2400
    @andreafranceschini2400 4 года назад

    Simply clear as water. Perfect.

  • @roopakmaddara6833
    @roopakmaddara6833 5 лет назад +1

    The outro is just epic!!!!!

  • @Javie188
    @Javie188 4 года назад +1

    This is exactly what i was looking for. Thanks for the videos!

  • @Gtv7020
    @Gtv7020 5 лет назад +5

    Woooow,i feel like i am watching my favorite movie and learning my favorite subject with my favorite teacher at a time!
    just wonderful.
    my Question is how on earth i didn't watch this till now?

  • @unibrow9384
    @unibrow9384 3 года назад +1

    Top notch video presentation and content. I absolutely love how your videos are able to hold my attention until the end.

  • @hajayedamir1878
    @hajayedamir1878 6 лет назад +4

    This is a great video about list comprehensions. Python is a neat language!

  • @mariannapeachyrose699
    @mariannapeachyrose699 4 года назад +1

    I loved every single second of this video

  • @utkarshrajpurohit1554
    @utkarshrajpurohit1554 5 лет назад +6

    "append to our list of subscribers" THAT WAS HILARIOUS XDDDDDDDDDDDDD

  • @mohamednour4901
    @mohamednour4901 5 лет назад +2

    One of best channels.
    This is a great video about list comprehensions.
    I love your content :) .

  • @whozz
    @whozz 7 лет назад +54

    Amazing video! I liked the futuristic-robot voice style

  • @killtomorrow123
    @killtomorrow123 5 лет назад +2

    Definitely helped me understand list comprehensions much better!

  • @KayDon-t8z
    @KayDon-t8z Год назад

    I thought I was really getting the hang of python until I got to list comprehensions. This video really helped A LOT though. Thanks!

  • @luisfernandoyupanquitaco8630
    @luisfernandoyupanquitaco8630 6 лет назад

    Complex topics in a single video!!! Great.

  • @vandyrock9746
    @vandyrock9746 6 лет назад +2

    Awesome.Finally one best video I was looking for.

  • @ApoorvaGarg0308
    @ApoorvaGarg0308 6 лет назад +1

    You have made it very very interesting! Well done!

  • @MrOzy8080
    @MrOzy8080 4 года назад +1

    Starting this video, it felt kind of gimmicky
    But I can't deny, this is an insanely good video with easy to understand and direct content
    Fantastic work!

  • @alexandrepv
    @alexandrepv 5 лет назад +2

    A nested loop... in a single line of code. I'm in love :D

  • @-x-dx7295
    @-x-dx7295 6 лет назад +1

    Crystal clear and helpful ! As usual 1

  • @brettvanderwerff6917
    @brettvanderwerff6917 7 лет назад +33

    Python cares about your sanity!

  • @psymon25
    @psymon25 4 года назад +1

    I personally think this style of teaching python is brilliant shame there is not more lately like this

  • @babakj7641
    @babakj7641 5 лет назад

    Hey @Socratica at 3:18 (Quadratic Reciprocity), it must be len(set(p_remainders)) = (p+1)/2 since you would have repeated elements in the list if you don't use set to discard the repeated remainders.
    And thanks for the your awesome videos, you guys are doing a great job!

  • @dhruvgarg8113
    @dhruvgarg8113 3 года назад +1

    Beautifully explained❤

  • @withravii
    @withravii 2 года назад

    Never understood List comprehension in a better way before this :) Thanks

  • @trentRalston
    @trentRalston 4 года назад +1

    Codecademy skimps on details in some of their lessons. You've covered what they missed! Thank you so much.

    • @Socratica
      @Socratica  4 года назад +1

      This was great to hear - thanks for letting us know! 💜🦉

  • @roi12555
    @roi12555 6 лет назад +17

    1:27 should be
    [expr for val1 in collection1 *for* val2 in collection2]

  • @mr.l3260
    @mr.l3260 6 лет назад +1

    I love Socratica!

  • @omtav9024
    @omtav9024 5 лет назад

    Best video ever! It really teach how to save time while coding lists

  • @ShinyArjunSingh
    @ShinyArjunSingh 5 лет назад

    wow man...made my life..
    Nice one Subscribed...Keep'em comin....

  • @informativecontent4778
    @informativecontent4778 Год назад

    Haha append yourselves to our list of subscribers, beautiful appended myself long ago keep up the good work

  • @ben-cb5er
    @ben-cb5er 5 лет назад +1

    subscribed and likeddddd!! omg please dont stop making python Tutorials ever!!! keep it up! i learn and you guys make it so much interesting lol thank you..

  • @lalitpatnaik7840
    @lalitpatnaik7840 6 лет назад +2

    We need more of these videos...
    It'll be really helpful if you can introduce analytics concepts with python.
    Bless you people :)

  • @itpugil
    @itpugil 3 года назад

    I tried learning the walrus operator last night, and tried applying it with the list comprehension examples given in this video. Its things like this that amaze me and make it fun to continue learning.
    Example:
    print( squares2 := [ i**2 for i in range(1,101) ] )

  • @gurubalavigneshnatarajan3817
    @gurubalavigneshnatarajan3817 11 месяцев назад +1

    Great explanation.. thanks 🙏

  • @aseanidmiller1238
    @aseanidmiller1238 4 года назад +1

    i love programming soooo much to learn

  • @akashk.a2964
    @akashk.a2964 4 года назад +1

    U guys are awsome😚

  • @dorondavid4698
    @dorondavid4698 5 лет назад +2

    This woman needs to be the next command and conquer computer helper voice ("Building...." "Building complete" "Our base is under attack.")

  • @Vorstellungskraft1
    @Vorstellungskraft1 7 лет назад +3

    You're so awesome that I created a Patreon account because of you guys! Thumbsup for the great quality videos!

    • @Socratica
      @Socratica  7 лет назад

      That's amazing! Thank you so much for your support!! You have no idea how thrilled we were to get your message. :D

  • @AwesomeFluffyBoobies
    @AwesomeFluffyBoobies 4 года назад

    thanks for this video. just started learning python and was struggling with list comprehensions, but this helped me

  • @kwrifles
    @kwrifles 2 года назад

    I graduated from beginner Python and moved to intermidate. The jump from beginner to intermediate was huge, these list comprehension are a major road block for me. Just got to keep practicing.

  • @TheAshwebstar
    @TheAshwebstar 5 лет назад +1

    This is a phenomenal way of teaching and explaining things. I am in love with this channel :)

  •  5 лет назад +1

    Excellent pronunciation of Descartes. Edit: I love your videos and have appended myself to your list.

  • @anasali8865
    @anasali8865 2 года назад +1

    it is wonderful!!!

  • @diencai1812
    @diencai1812 5 лет назад

    Very engaging and easy to understand. Love the persona

  • @meanmole3212
    @meanmole3212 7 лет назад

    Wow, I was looking a good video on this topic and even when this video got recommended I decided to ignore it first solely based on its thumbnail. Maybe my subconscious prejudices and stereotypes kicked in and guided me to avoid it, but when I overcame them and gave this video a chance I did not find it only very well made and informative but very creative and cool as well! Subscribed!

  • @CarloRizzante
    @CarloRizzante 7 лет назад

    Wow, cool episode, really. I'm so jobless at the moment but as soon as I'll get some income, be sure Socratica will be one of the good channels I'll support on Patreon. Can't wait to be able to do so!

  • @bevaraindumathi2685
    @bevaraindumathi2685 3 года назад

    The way you connect the concepts to real world, it's Simply Superb👌👌.

  • @hackprepa964
    @hackprepa964 7 лет назад

    wooooooooooooooooow........This is amazing ..everything ....all of it .....i can t stop watching your videos....soo smart yet so simple ...Thank you