⭐ Join my Patreon: / b001io 💬 Discord: / discord 🐦 Follow me on Twitter: / b001io 🔗 More links: linktr.ee/b001io
Пікірлер: 318
@cozmokitten172 Жыл бұрын
that was actually really helpful! you explain everything so simply and quickly!
@kaiaugust990610 ай бұрын
Way better explanation than 99% of what's out there. Great job!
@wizkidd0611 ай бұрын
Now that's how you breakdown a difficult concept. You allowed your audience to relate to it by using simple laymen terms and not using a lot of technical jargons. Awesome job!
@kingofmontechristo7 ай бұрын
AI, stop spamming in the comments. Comments are for humans and not for robot without true opinions
@stuckinthe2000sforever21 күн бұрын
@@kingofmontechristo imagine arguing with a robot.. at that point you need to offlinemaxx permanently
@kingofmontechristo21 күн бұрын
@@stuckinthe2000sforever clearly a joke, seems like you did not touch grass for years
@kituvapraveen4361 Жыл бұрын
The clarity with which you convey complex concepts is truly extraordinary, leaving us with a profound understanding of the subject matter. Your explanations are exceptional! 👏👏👏
@rkidy10 ай бұрын
Idk why but your comment seems AI generated
@scrung9 ай бұрын
@@rkidyIdk why but you seem paranoid
@rkidy9 ай бұрын
@@scrung nah I’ve just asked chatGPT to rewrite too many of my paragraphs 😭😭
@mews758 ай бұрын
@@rkidy THAT'S WHAT IM SAYINGG
@dutchgreen86194 ай бұрын
@@rkidy That’s genuinely sad
@ChannelMath8 ай бұрын
you can always use just a list or dict as a single argument if you're unsure, but once you get proficient you'll naturally want to do this
@joelngige5776 Жыл бұрын
Such a cool way of explaining the concept of *args and **kwargs. Thanks for the great video!!!
@Klonzo335 ай бұрын
Super straight-forward and helpful. Thank you!
@fire17102 Жыл бұрын
I'm always using *args **kwargs in my functions! I love dynamic data driven programming, and usually use the kwargs to pass extra metadata to functions. Super useful when pipelineing, function chaining, when writing generic code, or when you have a lot of non mandatory but potentially important paremeters
@Naej79 ай бұрын
Meh, I’m failing to imagine when *args or **kwargs are actually the only way to do a thing
@Naej79 ай бұрын
@@wzore6480 Yeah, fricking matplotlib 😂
@sniperzrx9 ай бұрын
This is insane. You made this so easy to understand! This is even better than how ChatGPT or many tutorials teach!
@MahinurUygur8 ай бұрын
Gosh, you are LITERALLY a life saver, I've been struggling with this for weeks, and now I'm kinda like "was that all?". AHHH thank you!!
@aakashgiri16227 ай бұрын
sameee !!!!!!!!!!!!!!!!!!!!
@alexgodino20956 ай бұрын
Perfect explanation. You just didn't mention they are optional arguments :)
@erenc83779 ай бұрын
Simple, clear and quick explanation. Thanks for the video. I subscribed 😂
@Rep-L4Y Жыл бұрын
Great explanation
@sdaiwepm Жыл бұрын
Thousands of tech explainer channels these days, but so few get straight to the point with clear and succinct explanations - like you do. Thanks!
@Cahangir Жыл бұрын
Dropping a comment to boost your channel growth. Nice tutorial!
@EloquentEpoch Жыл бұрын
FInally after 5 years of writing python code and projects, i now fully understand what that always was about. 😄. Thanks
@hazard-nico9 ай бұрын
This is what we need at college. Thanks for the tips
@robertodelgado638710 ай бұрын
What a lovely video, I sure wish I had found these tips when I was learning, great for beguiners
@oliverpolden10 ай бұрын
Great video, but do these encourage sloppy coding? It’s difficult to understand from the function definition what should go in those variables. It’s almost the opposite of strict typing. For example, it’s not obvious that *toppings should be a list. Surely it’s better to specifically say it should be a list? Then if say you passed in a comma separated string, it would tell you it expects a list and not a string.
Thank you for the tutorials. Very helpful! Just subscribed
@henrymellor97609 ай бұрын
Why did I not learn this in college?
@GPrime80810 ай бұрын
What color scheme are you using for your VS Code?
@nitkarshchourasia24069 ай бұрын
🎯 Key Takeaways for quick navigation: 00:28 🌌 *The asterisk (*) in Python, when used before an iterable like a list, is the unpacking operator, printing individual elements.* 01:09 🍕 *Using `*args` in a function allows flexibility for an undefined number of arguments, demonstrated in the "order pizza" function for toppings.* 02:30 🌐 *`kwargs` in a function handles keyword arguments, placing them into a dictionary. Illustrated with the "order pizza" function for delivery and tip details.*
@elbadrey Жыл бұрын
actually, I can't find any special words to tell you what I'm feeling about your explanation, so simple, helpful, and quick.
@symnshah7 ай бұрын
It was hard to understand *args, **kwargs but now its too simple
@ifstatementifstatement27049 ай бұрын
If I remember correctly the former means you can pass a list of any type to a function and the latter a dictionary.
@VarkaKitovsky Жыл бұрын
What font are you using?
@sedhain_pankaj8 ай бұрын
So basically, * unpacks a list and ** unpacks a dictionary.
@JayJay-ki4mi Жыл бұрын
I'm being pedantic here, but they're called "starred expressions" in this context. The unpacking operator can be used in different ways such as unpacking a list: "a, b, *c = [1, 2, 3 , 4]".
@code-to-learn8 ай бұрын
Thanks a lot sir !
@aakashgiri16227 ай бұрын
Thanks mann lifesaver
@Loumout Жыл бұрын
Hello, simple question, Can we put for exemple "peperonni", delivery=True, "olives", tip=5 does arguments works even if they are not next to each other ? or we need to do *toppings1, **details1, *toppings2, **details2 for example
@blackcrow22929 ай бұрын
C++, C# dev: what the hell, I thought it's pointer
@arbitervildred89999 ай бұрын
c++, c# writing an entire library to parse positional keywords or unspecified number of parameters
@popa42 Жыл бұрын
I’ve actually googled this yesterday and did not really find a satisfying answer - but this explanation is really great! Keep up the great work :)
@souadzaoui7148 Жыл бұрын
Very good explained
@gbvtech Жыл бұрын
hi, what is the oh my posh theme are you using in your terminal?
@moy92 Жыл бұрын
Beautiful and easy to understand. Thank you!
@LeontarioАй бұрын
Very helpful man, thanks!
@quang.design9 ай бұрын
Thank you!
@davekoot78805 ай бұрын
Very well explained!
@rahmatchy2 ай бұрын
This is the simple way i understand easily. Can you explain Class in this way?
@LEGENDOWSKI5 ай бұрын
That was super helpful 💯
@MOOBBreezy Жыл бұрын
After using python for almost 5 years now, I finally know what these mean!!! I could definitely think of a few use cases for this in my past projects, will definitely use it a lot more in the future!
@Rishabhtg1810 ай бұрын
How do you type like that
@Hnxzxvr5 ай бұрын
Like what
@Outflew5 ай бұрын
He probably already typed the whole thing then pressed undo, then in the video he pressed redo to appear as this
@gamingwithraien4639Ай бұрын
Delete chucks at a time and ctrl/command+z?
@madbanana22Ай бұрын
autohotkey
@MckenzieScott-t1y16 күн бұрын
Keyboard
@saptarshimukherjee84475 ай бұрын
I never knew this much details....Exceptionally good
@aasutossh10 ай бұрын
what's the font and the theme?
@joaomatheus798810 ай бұрын
Wait, I knew about *args, but had no idea about **kwargs
@Krumelur10 ай бұрын
I get the point of maximum flexibility. Mind commenting on clarity? This version of the function: `def order_pizza(size: str, toppings: List[str], details: Dict[str, Any]) -> None:` would be called using `order_pizza("large", ["pepperoni", "olives"], {'delivery': True, 'tip': 5})`. Adding type hints and removing unpacking makes it super clear what is expected to be passed as params and in what format it is expected. Pros, cons?
@discriminate9 ай бұрын
Is there any reason to prefer this, over say order_pizza(size, toppings=[], delivery=False, tip=0). I guess it’s more dynamic, but I think being exact with what parameters a function can handle (even if it requires a long function signature) would be preferable.
@Reycko Жыл бұрын
i'm not even learning python yet your videos are entertaining and i still watch them all big fan of your content
@devashish_7 ай бұрын
Watching this a few hours before my Python Mid-Term Exam
@viniciusfigueiredo6740Ай бұрын
Thank you for this explanation! Greetings from Brazil
@mukesh41697 ай бұрын
The real question is how did you make the output line to be not crazy long like C:\Users\million\diffferent\shit\that\I\don't\want\to\see .....???
@lRainZz9 ай бұрын
Broooo enable your neon dreams if you're using synthwave84 :D
@nogool1118 ай бұрын
extremely easy to understand
@asr5910 ай бұрын
so what's the difference between using this method and something like: order_pizza(size, toppings: list, details: dict)?
@Neerraj-cm9lc4 ай бұрын
Good explanation ❤
@s7mogato7 ай бұрын
Excelente explicación, simple y clara ........mis felicitaciones.
@ajaypatro15549 ай бұрын
so it basically * is for postional arguements for creating tuple ** and it for making dict
@Nightmaremaker856 ай бұрын
i cant belive how simple explain everything men, really thanks!!!
@tomasgomes19789 ай бұрын
Thank you for the video is very helping, I have just one question, why not do function(size, topping:list, details:dict) ? ok, the toppings will not be unpacked but it's not a problem, and for details you can have a dictionary with default values in it and just change it before calling the function, no ?
@judevector24 күн бұрын
Damn this was very much helpful,the clarity is top notch . Thanks
@Kira-vs4npАй бұрын
Best explanation
@HideBuz3 ай бұрын
How do you prevent a buffer overflow when a malicious hacker overloads the kwargs with millions of key words?
@ashishkkrishna11 ай бұрын
So the * operator is like Javascript's spread(...) Operator?
@jambalaya9743 ай бұрын
How the fuck do I have over 5 years in python and I've never used the unpacking operator? What the fuck?
@Jelte_Dijkmans Жыл бұрын
Thank you, I used this with my discord bot program!
@TestyCool9 ай бұрын
WOW I have watched 10min tuts on this and walked away feeling like I understood less then I did after watching this one.
@manasapochampalli91082 ай бұрын
Cool I never knew that, this looks like it'll be very helpful in code for me one day. Thanks! You just earned yourself one more subsciber.
@youteubakount44497 ай бұрын
Very interesting and way clearer than most tutorials! One question though: I don't see how "*" being unpacking relates to it being used in front of args. It seems like in this case, it does the exact opposite: it takes multiple arguments and packs them together. Can anyone offer some insight into the logic?
@evileye177 ай бұрын
I like your every videos and your videos are also helpful for me sometimes. But the thing is that your videos are helpful only sometimes, because your videos are sometimes very short to understand the concept. So it would be better if you could increase the lengths of your videos. And, thanks for your help you provided till now in my programming learning journey... 😊 ❤
@SirIsaacNewton-bf6se Жыл бұрын
Thank you so much. I studied this topic before but I did not manage to understand in this depth. 🥳 Keep up the good work, cheers
@wh1pper4579 ай бұрын
do you have a video about for loops where there are two things between "for" and "in" (I don't know what this for loop is called sorry for my bad expression)
@紫晶-w5s26 күн бұрын
感謝KZbin的演算法讓我看到 這正是我想知道的
@SergeB268 Жыл бұрын
Sir your topic is so good can you help us to make like 2 hours course from your first yummy slice 🍕 of python to whenever you want coz it sometimes mix us in head
@tonkyboy89207 ай бұрын
Nice video! How did you manage to look your terminal like this? Its super clean and i would like to have a similar clean terminal.
@crease916910 ай бұрын
thank you
@bqiu865 ай бұрын
Thank you! You made it very simple to understand!
@bryan192 Жыл бұрын
coding for 2 and a half years and just understood why it was called kwargs. Also you should call it keyword agrs
@dannyblozrov1142 Жыл бұрын
Very useful, thank you very much.
@liebestraum003 Жыл бұрын
Wonderful explanation. I've been developing with Python for a long time and I gotta say your video is clear and simple. Super easy to understand, would definitely recommend your videos to new developers. Keep up the good work!
@forgotabhi7 ай бұрын
wow you're truly amazing! Thanks a lot.
@Kamil-rf5qn7 ай бұрын
How is the code just appearing out of nowhere, is this editing or some plugin?
@channel_panel1937 ай бұрын
i like these but never really found a reason to use them much. Why not just pass in a list of toppings?
@fedetrus17 ай бұрын
Increíble explicación!!!!! desde Argentina!
@HansLemurson10 ай бұрын
I've always thought that "Args and Kwargs" would be a great name for a Python-themed Table-Top Roleplaying system.
@dev156527 ай бұрын
The most easy to digest explanation i can find on youtube!
@tanweerashif5 ай бұрын
FFS, please buy a good loud mic! Can't hear sh** without ANC! About the content - very clear and concise. Thanks for that.
@VeronicaVerinceanu6 ай бұрын
please, may you tell us what font and theme do you use?
@ouchvinny45209 ай бұрын
Super unrelated but how do you make your terminal look clean and only show the output and not the the path?
@colinmaharaj7 ай бұрын
I am sticking with C/C++, it appears to be simpler
@eastereggpuriАй бұрын
0:50 list and str are iterable, not iterator, and the * takes iterable not iterator.
@bashar92004 ай бұрын
Thank you for sharing! I finally got how this work!
@clint38658 ай бұрын
So **kwarg becomes a dictionary?
@rnedisc7 ай бұрын
Allowing functions to accept unlimited and completely arbitrary data feels like a huge risk for creating hard to find and unexpected bugs... But I guess they're useful for something.
@firtzz111 ай бұрын
Thanks!
@yifeiren80049 ай бұрын
Don't use args and kargs unless you must. It is easy to make error and makes your codes messy.