How cool would it be to have live chat on your website?? Make it happen for free in like 5 min with 3CX: ntck.co/3cx Python Tuples……what are they? Are they the same as Python Lists? In this video, we’re going on a journey to uncover all the deep, dark secrets of tuples. 🔥🔥Join the NetworkChuck Academy!: ntck.co/NCAcademy 🆘🆘NEED HELP?? Join the Discord Server: discord.gg/networkchuck ☕☕ NEW coffee: ntck.co/coffee **Sponsored by 3CX
Comment section has gotten completely overrun by spambots. I really wish RUclips would track the IP addresses, if not the MAC addresses, of offending machines and simply ban spam offenders for a week or more.
Tuples are also hashable, which means that you can use them as dictionary keys, which, by extension, means that you can do pattern matching with tuples
The amount of studying I had to do just to understand this comment goes to show how compact and powerful a tulple is. Had to look up how hashing translates to tuples - then search what pattern matching is. Lol great stuff! Thanks for this!
Hey chuck. Every other python teacher is monotone or slow very little interactively your teaching is truly awesome I hope you continue it for years to come
there is also one key difference between lists and tuples: if two tuples have the same values, they are also the same object, meaning their id is identical. this is something to be mindful of when deepcopying objects, that have tuples somewhere down the line. Happened to me once at my student assistant job
They will only have the same id if using copy.deepcopy(): t1 = ('asdf', 'fdsa') t2 = ('asdf', 'fdsa') print(t1 is t2) # False because id(t1) != id(t2) # Now using copy import copy t2 = copy.deepcopy(t1) print(t1 is t2) # True because id(t1) == id(t2) Since they are immutable, why would you want a new object?
This is not true. They will have the same hash (assuming the things in the tuple are hashable too) but, unless they were just two references to the same tuple all along, they are still distict objects with different ids.
It shouldn't matter if deepcopy returns the same object or not, because its immutable. Its the same with a string or an integer or other immutables. The only way this could bite you is if you use `is`. But one should only use `is` against `None`, `True` and `False` - the only true singletons in python.
I'm not sure if that's correct actually. An empty tuple will be the same object(ie have the same ID) but as soon as you load data into it, it becomes it's own unique object. You can check this using the "is" Statement. () is () will be true... but (1,2) is (1,2) will be false. The "is" Statement will check that they are the same object. Since a non-empty tuple returns false whereas an empty tuple returns true, I believe that means python will only ever have one object for an empty tuple but at the point you give the tuple any values(regardless of if it's the same values) it will create new objects.
Please keep uploading. I started watching your videos with no Linux and Python knowledge and I am at your 7th python video. I can easily write a script just like the robotbarista without even copying from you. I literally learned because of you. Thank you very much!
A handy way to pronounce tuple correctly is to say single, double, triple, quadruple, quintuple, sextuple, septuple, octuple... n-tuple. Also, a fun bit about tuples is that they are Product types, and they're an important component to algebraic type functional languages. An example of a Sum type would be enums with payloads. Product and Sum types are also called And and Or types.
When they are “triple”, “quadruple” “quintuple”, should it be then “n-ple”? I see that most of the words have the Latin numeral with the last vowel changed to u and the suffix “ple”.
@@matj12 I don't know that anyone was going for scientifically correct or correct Latin. Someone probably just said it, it was easy, close enough, and it stuck. 🤷♂️
I love the way you explain things. Learning to program is challenging at times. You need to spend so much time learning and practice therefore last thing anyone need is a boring tutorial. That sense of humor made everything better without wasting time. Love man. Keep it up.
some more crucial facts about tuples 1. not only tuples, you can unpack every iterable (other tuples, lists, generators, iterators etc.) just like (zero, one) = range(2) (*lst,) = range(100) # this is a list with 100 integers in range 0-99 inclusive [*lst] = range(100) # and this is a similar list, but cleaner syntax the same way you do, when you define a function with variadic arguments: def varfunc(*args, **kwargs): return args, kwargs args variable will always be a tuple, and kwargs always a dict varfunc() -> ((), {}) varfunc(1, 2, network='chuck') -> ((1, 2), {'network': 'chuck'}) (same as you can * on the iterables, you can always ** on mappings, like for example varfunc(**{'network': 'chuck'}) -> ((), {'network': 'chuck'}) 2. mutable/immutable list is mutable, you can not only assign indexes, but also slices (which calls list.__setslice__() in the background, like lst[1:3] = range(2) and is used for implicit list reinstantiation in functools for example), you can use .append(), .pop(), .remove() and so on tuple is not able to perform those due to unchangeability mentioned in the video, and also you may notice some optimization in the background happening, like if you check ('1', '2') is ('1', '2'), it returns True ('is' keyword examines for the same memory addresses of variables). it's called interning and works due to the immutability (in the same process scope). with lists not, because they are two separate modifiable objects that can differ in time. if you want to see some interesting experiment with mutability, check out frozenlist library github.com/aio-libs/frozenlist created by the authors of aiohttp. once you call .freeze() on a special instance that behaves similarly to list, it becomes immutable and you can use it as if it was a tuple. 3. how to change tuples? you can create new tuple variables that consist of some other tuples. to "change" a tuple t = ('network',), you can create a new variable in place of the old one (overwrite it) like this: t += ('chuck',). this makes it a t = ('network', 'chuck'). you can just use the + operator to add tuples. if you want to add a list to tuple, you can include it using unpacking. for example, having a list v = ['network', 'chuck'], you can make (*v, 'is', 'cool'). this results in ('network', 'chuck', 'is', 'cool'). 4. the 'tuples are hashable' myth it's not enough to say 'tuples are hashable'. they are only hashable if their all members are hashable, too. can you hash ([],)? cheers, nice vid network chuck!
I watched the first couple minutes and my short attention span got the better of me but the 3CX ad was the only sponsor message I’ve watched that has benefitted me, literally got that on my site in 10 mins so thank you for that bit in the beginning.
I just got an IT specialist job for the government just want to say watching your videos really kept me inspired. I only was able to obtain my A+ certification so far and was able to get an Help desk job, I worked there for about a year and then was offered an IT specialist job. I just want to say guys don't give up if you want to do IT just keep studying and try to obtain as many certs as you can. I'm currently working on my Network + certification. It took me atleast 2 years to find a help desk starter job after getting an certification but once you get your foot in the door just keep applying to the higher jobs and also just keep studying no matter how busy you are atleast try to get 2 hours of studying in a day.
Can you please continue your python course because I have watched it all and thank you very much for teaching me. You are the best learning You tuber. I watch you every day and learn from you. I am 9 years old and love learning about computers and IT I have watched your Linux, CCNA and Bash courses Thank you very much. You're videos are motivation me a lot. Angad Singh
You should do more educational videos. Based on this video alone, you are among the best educators I've ever seen. I don't even mind the ad, you made it lovely!
When are we getting the next CCNA episode? I’m really looking forward to it, I’m studying for my CCNA and your videos has been really helpful. Thanks for what you do for the community Chuck.
Great video. One other use case for Tuples: when you have a list or collection of data that will NEVER change, it’s good practice to use a tuple to ensure you don’t accidentally add or remove any items. Think of a list containing the months of the year, or the names of WW2 generals. That’s not something that would ever change, and by using a tuple rather than a list, you’re guarding against rogue code (potentially written by someone else years later) that tries to change that unchangeable tuple you created.
Awesome, thank you for this! I’m literally finishing up a python 🐍 class and was still a little bit fuzzy on list and tuples. However, explaining it in terms of mutable and immutable that makes sense and the speed and storage and data involved! 🙌🏽🙌🏽🙂
Python is great brother .let me give you a hint though, make sure you learn intro to comp sci as well. That way when you can’t use python you’ll be able to quickly learn the necessary language ;).
C# programmer here. I just used my first tuple a couple weeks ago. I found myself with a function in which I couldn't decide on the return type. I thought "What if I could return TWO variables at once? Oh, I could use a tuple!" And then a couple days later I was writing a program that calculates a bunch of fractions. I wrote a function that returns a tuple containing the numerator and denominator. Pretty nifty! It's like creating a miniature class on the spot (that doesn't have functions) and using it on the fly.
So, this is the end? Not even saying bye to all people like me that followed you since the first video to this one. I NEED YOU TO MAKE MORE VIDEOS😭😭 I LOVE THIS SERIES. PLEASEEEEEEE like this to make him see it
Hey chuck, I'm in college for IT. I love watching your videos. Currently I am learning about the osi and the tcpip models. This is all very interesting.
Just finished the NetworkChuck Python intro course. And have to say this is the best little intro to Python that I have found on RUclips. Looking forward to seeing more episodes. When are they coming out?
Python type annotations for lists and tuples now enforce the convention. list_of_ints: list[int] = [1,2,3,4,5] three_type_tuple: tuple[int, str, bool] = (1, "a", True) Think of tuples as having a well-defined structure, like the arguments to a function. While a list stores a variable number of similarly typed values.
THANK YOU! Your first comment about being immutable was an AH HA moment for me. I’m trying to change the result of a betting game and could not figure out why the value changed when it’s returned. It’s changing back because it wasn’t allowed to be changed to begin with!
so, the mutability thing is weird with tuples. You can mutate mutable objects inside of the tuple. But you cannot replace the object in a tuple with a new object. So strings, ints, floats, etc are immutable too so the immutability thing with tuples makes a ton of sense. But, custom objects, or even lists, are mutable. Placing a mutable object in an immutable tuple does not make it immutable. Very weird, but it makes sense.
I know tuples are also more memory efficient by quite a bit in some cases. If you're dealing with say streams of data and it is in a collection, you will want to use a tuple where possible as an easy way to cut on memory by at least a bit. Of course nowadays this is less a concern because memory management and sending streams of data are less of a concern than in the Python 2 days but in some cases trading out tuples for lists can be pretty useful, especially if you're trying to Cythonize your Python code since those seconds add up (such as doing expensive calculations, as with neural networks and similar projects, or need quick responses, like with fast-paced games and flight tracking/management). I know when you need Python to do the same thing many times in a day, a second here or there can really add up. Unless you're big on process efficiency, you probably can get away with using lists instead even then at least 9 out of 10 times.
@@drdesten Yes, but even for cases where you can afford to use python rather than a significantly faster language, you can still drastically affect the performance of your code depending on how you write it.
Whoooaaaa…. How insane is it that @NetworkChuck doesn’t post a video for a few weeks and when that video posts, it’s a topic I am studying like… right now…. Like right before I watched this video I was watching Python for Everybody’s 13 hour course video at the 5:40 marker wrapping up the Tuples lecture. The timing is just… WHAT?! @NetworkChuck, just hire me already! You’ve basically put hours and hours into training me with these videos man. May as well put my training to work!
The most practical use case of tuples i.m.o. is having multiple return values from a function. Something like an error code and a message, or a succes/fail boolean and some result. Etc. Very helpful, especially when used in conjunction with tuple unpacking.
that makes sense how you would organize the lists/tuples. i usually use dictionaries to categorize, but instead i could just be using tuples! great video, as always!
How cool would it be to have live chat on your website?? Make it happen for free in like 5 min with 3CX: ntck.co/3cx
Python Tuples……what are they? Are they the same as Python Lists? In this video, we’re going on a journey to uncover all the deep, dark secrets of tuples.
🔥🔥Join the NetworkChuck Academy!: ntck.co/NCAcademy
🆘🆘NEED HELP?? Join the Discord Server: discord.gg/networkchuck
☕☕ NEW coffee: ntck.co/coffee
**Sponsored by 3CX
Please complete the CCNA course first ..
Waiting for it from long time..
How to join in NCA academy
Please Make Video : ROUTER FIRMWARE BACKDOORING!
Comment section has gotten completely overrun by spambots. I really wish RUclips would track the IP addresses, if not the MAC addresses, of offending machines and simply ban spam offenders for a week or more.
Btw it's 10 million (your loop count) 🙃
Tuples are also hashable, which means that you can use them as dictionary keys, which, by extension, means that you can do pattern matching with tuples
That’s pretty cool, I haven’t tried that before!
It's a big part of cloud computing
Very helpful!
The amount of studying I had to do just to understand this comment goes to show how compact and powerful a tulple is. Had to look up how hashing translates to tuples - then search what pattern matching is. Lol great stuff! Thanks for this!
@@Virtuous_Rogue Can you elaborate on this? Curious to learn how that works.
Hey chuck. Every other python teacher is monotone or slow very little interactively your teaching is truly awesome I hope you continue it for years to come
I just hope he add the function part
I hope Im alive for the next episode
@@underdrip7957 Same
He won't continue teaching python.
Appreciate the shout-out as a fellow heterogeneous hacking RUclipsr!
hey chuck, you can use underscores to make numbers more readable, like 1_000_000 still gets interpreted as a million by python :)
I love underscores for readability. If @NetworkChuck had used them, he'd realize the timing script was set for 10 million and not 1 million.
omg :) i didnt know this thank you!!
i didn't know that before, thank u
What about:
1_00_0000
How does it handle?
@@ALCRAN2010 just 1000000, it probably just interprets it the exact same just more readable
there is also one key difference between lists and tuples:
if two tuples have the same values, they are also the same object, meaning their id is identical.
this is something to be mindful of when deepcopying objects, that have tuples somewhere down the line.
Happened to me once at my student assistant job
They will only have the same id if using copy.deepcopy():
t1 = ('asdf', 'fdsa')
t2 = ('asdf', 'fdsa')
print(t1 is t2) # False because id(t1) != id(t2)
# Now using copy
import copy
t2 = copy.deepcopy(t1)
print(t1 is t2) # True because id(t1) == id(t2)
Since they are immutable, why would you want a new object?
That's great to know!
This is not true. They will have the same hash (assuming the things in the tuple are hashable too) but, unless they were just two references to the same tuple all along, they are still distict objects with different ids.
It shouldn't matter if deepcopy returns the same object or not, because its immutable. Its the same with a string or an integer or other immutables. The only way this could bite you is if you use `is`. But one should only use `is` against `None`, `True` and `False` - the only true singletons in python.
I'm not sure if that's correct actually. An empty tuple will be the same object(ie have the same ID) but as soon as you load data into it, it becomes it's own unique object. You can check this using the "is" Statement. () is () will be true... but (1,2) is (1,2) will be false. The "is" Statement will check that they are the same object. Since a non-empty tuple returns false whereas an empty tuple returns true, I believe that means python will only ever have one object for an empty tuple but at the point you give the tuple any values(regardless of if it's the same values) it will create new objects.
They're useful when you don't want variables to change at runtime. An example of this would be a settings file in an application.
Please keep uploading. I started watching your videos with no Linux and Python knowledge and I am at your 7th python video. I can easily write a script just like the robotbarista without even copying from you. I literally learned because of you. Thank you very much!
why did you just stop uploading lessons??? you're a good teacher ever
can you please continue??
So he could put the rest of the lessons behind a paywall. "First one's free kid."
@@GlorifiedGremlin TRUE ☹☹☹
I was just trying to learn python, and by far you are my favourite teacher yet. Please continue this course on RUclips soon
We got a video, hooray!!!
yeah!!!
Please continue this series!
It has helped me so much!
A handy way to pronounce tuple correctly is to say single, double, triple, quadruple, quintuple, sextuple, septuple, octuple... n-tuple. Also, a fun bit about tuples is that they are Product types, and they're an important component to algebraic type functional languages. An example of a Sum type would be enums with payloads. Product and Sum types are also called And and Or types.
When they are “triple”, “quadruple” “quintuple”, should it be then “n-ple”? I see that most of the words have the Latin numeral with the last vowel changed to u and the suffix “ple”.
@@matj12 I don't know that anyone was going for scientifically correct or correct Latin. Someone probably just said it, it was easy, close enough, and it stuck. 🤷♂️
Hey man I started Python this Sunday and this banger is enough to get me out of the rut.
Closed Captioning has taught me a lot about Tules, Two Pools, Two Bowls, and Tubals.
Haha 😅😅😅😅
Haha 😅😅😅😅
I love the way you explain things. Learning to program is challenging at times. You need to spend so much time learning and practice therefore last thing anyone need is a boring tutorial. That sense of humor made everything better without wasting time. Love man. Keep it up.
I soo badly need you to teach me tkinter, i want more of your way of teaching.
You are the only one that make me understand!
Chuck I live you man. Your channel makes my ccna and python class easier to understand
some more crucial facts about tuples
1. not only tuples, you can unpack every iterable (other tuples, lists, generators, iterators etc.)
just like
(zero, one) = range(2)
(*lst,) = range(100) # this is a list with 100 integers in range 0-99 inclusive
[*lst] = range(100) # and this is a similar list, but cleaner syntax
the same way you do, when you define a function with variadic arguments:
def varfunc(*args, **kwargs):
return args, kwargs
args variable will always be a tuple, and kwargs always a dict
varfunc() -> ((), {})
varfunc(1, 2, network='chuck') -> ((1, 2), {'network': 'chuck'})
(same as you can * on the iterables, you can always ** on mappings, like for example varfunc(**{'network': 'chuck'}) -> ((), {'network': 'chuck'})
2. mutable/immutable
list is mutable, you can not only assign indexes, but also slices (which calls list.__setslice__() in the background, like lst[1:3] = range(2) and is used for implicit list reinstantiation in functools for example), you can use .append(), .pop(), .remove() and so on
tuple is not able to perform those due to unchangeability mentioned in the video, and also you may notice some optimization in the background happening, like if you check ('1', '2') is ('1', '2'), it returns True ('is' keyword examines for the same memory addresses of variables). it's called interning and works due to the immutability (in the same process scope). with lists not, because they are two separate modifiable objects that can differ in time.
if you want to see some interesting experiment with mutability, check out frozenlist library github.com/aio-libs/frozenlist created by the authors of aiohttp. once you call .freeze() on a special instance that behaves similarly to list, it becomes immutable and you can use it as if it was a tuple.
3. how to change tuples?
you can create new tuple variables that consist of some other tuples.
to "change" a tuple t = ('network',), you can create a new variable in place of the old one (overwrite it) like this: t += ('chuck',). this makes it a t = ('network', 'chuck'). you can just use the + operator to add tuples.
if you want to add a list to tuple, you can include it using unpacking. for example, having a list v = ['network', 'chuck'], you can make (*v, 'is', 'cool'). this results in ('network', 'chuck', 'is', 'cool').
4. the 'tuples are hashable' myth
it's not enough to say 'tuples are hashable'. they are only hashable if their all members are hashable, too. can you hash ([],)?
cheers, nice vid network chuck!
Thanks for explanation!
Thanks! Very interesting! Could it be though that there's a little mistake? (*tup,) = range(100) ; type(tup) --- returns list, not tuple
Cool tutorial! I have been watching all the tutorials you have been making, and all I can say is keep making more!
Love the yt subtitles "why do we have two pools, because it's faster"
please bro continue this series
I watched the first couple minutes and my short attention span got the better of me but the 3CX ad was the only sponsor message I’ve watched that has benefitted me, literally got that on my site in 10 mins so thank you for that bit in the beginning.
I was just thinking of this exact concept yesterday. While learning about it.
Please continue to upload more videos i learned so much from your videos, because of the way you teach
WE NEED MORE PYTHON VIDEOS CHUCK!!!
This was the EXACT question I asked myself when I first started looking at Python...
You have the best python course on RUclips! Please finish it! I love it! I need more!
I just got an IT specialist job for the government just want to say watching your videos really kept me inspired. I only was able to obtain my A+ certification so far and was able to get an Help desk job, I worked there for about a year and then was offered an IT specialist job. I just want to say guys don't give up if you want to do IT just keep studying and try to obtain as many certs as you can. I'm currently working on my Network + certification. It took me atleast 2 years to find a help desk starter job after getting an certification but once you get your foot in the door just keep applying to the higher jobs and also just keep studying no matter how busy you are atleast try to get 2 hours of studying in a day.
Hurray 😻. Python returned ❤️. Take love from Bangladesh 🇧🇩
LETS GO CHUCK IS RESUMING THIS SERIES (please keep resuming it is literally the most watched series of ur channel)
Used them as a "matrix" in python when i started learning in college, helped me a lot.
Can you please continue your python course because I have watched it all and thank you very much for teaching me. You are the best learning You tuber. I watch you every day and learn from you. I am 9 years old and love learning about computers and IT I have watched your Linux, CCNA and Bash courses Thank you very much. You're videos are motivation me a lot. Angad Singh
and a super big advantage of immutable data-types is they are thread safe & do not need any locks or care whilst accessing them.
Subscribed. I mean, the way you delivered that content, I couldn’t forget what a tuple is if I tried.
i was eagerly waiting for this. please make more videos on python.
yes more of the python series please like so chuck could see
Thanks!
we are waiting for the episode 11
OMG, this makes so much sense now!
Thank you Chuck!
How you wrapped up the video is awesome 😂 💯 🔥
I love how you explained it!!! You answered all the 'dumb' questions that come to our mind!
I find this video extremely useful. Keep up the good work.
Thanks auto subtitles, now I understand why we use two pools.
You should do more educational videos. Based on this video alone, you are among the best educators I've ever seen. I don't even mind the ad, you made it lovely!
Waiting for ur next episodes. .. 😊
It's been over a month 😢
@@swallowedinthesea11 yeah :(
Chuck I was waiting for your video today and it's here, thank you❤
Cool quick video Chuck! Keep it up!
Thanks for the continuing the series! Looking forward to the next video!
This series has really helped me a lot as a beginner learning python. I really appreciate it and I hope we'll see some more python episodes.
Honestly... You got me to like and comment with that last line. Well played!
When are we getting the next CCNA episode? I’m really looking forward to it, I’m studying for my CCNA and your videos has been really helpful. Thanks for what you do for the community Chuck.
We waited for more than half a year for Chuck to upload episode 10 of Python! CCNA can wait.
Great video.
One other use case for Tuples: when you have a list or collection of data that will NEVER change, it’s good practice to use a tuple to ensure you don’t accidentally add or remove any items. Think of a list containing the months of the year, or the names of WW2 generals. That’s not something that would ever change, and by using a tuple rather than a list, you’re guarding against rogue code (potentially written by someone else years later) that tries to change that unchangeable tuple you created.
That is actually really clever.
Awesome, thank you for this! I’m literally finishing up a python 🐍 class and was still a little bit fuzzy on list and tuples. However, explaining it in terms of mutable and immutable that makes sense and the speed and storage and data involved! 🙌🏽🙌🏽🙂
Python is great brother .let me give you a hint though, make sure you learn intro to comp sci as well. That way when you can’t use python you’ll be able to quickly learn the necessary language ;).
First video I see of you, and I like it!
Hi, what program are you using to draw on your desktop?
I'm pretty sure it is Epic Pen
@@GreatOutdoors1 thank you
Wow! Finally, a great video explanining in detail what is so special about tuples, also kudos to the guiy from StackOverflow :)
You're videos are gold. Thank you for your time making these videos. They have helped on my journey, and with someone with adhd, that says a lot.
I smile everytime I see Networkchuck upload😊😊
Editor: nice fast and fun edit. However, could the music be around 6db less in the mix? It's a bit much and distracting. Thx and keep it up! :)
Just completed this! Now waiting for new vid
Great video! Thanks for digging deeper and not just stopping after 1:41 ;)
C# programmer here. I just used my first tuple a couple weeks ago. I found myself with a function in which I couldn't decide on the return type. I thought "What if I could return TWO variables at once? Oh, I could use a tuple!" And then a couple days later I was writing a program that calculates a bunch of fractions. I wrote a function that returns a tuple containing the numerator and denominator. Pretty nifty! It's like creating a miniature class on the spot (that doesn't have functions) and using it on the fly.
WOW that is so simple and so handy. Great video!
I love your style of presenting its very fun and informative!
So, this is the end? Not even saying bye to all people like me that followed you since the first video to this one. I NEED YOU TO MAKE MORE VIDEOS😭😭 I LOVE THIS SERIES. PLEASEEEEEEE
like this to make him see it
Hey chuck, I'm in college for IT. I love watching your videos. Currently I am learning about the osi and the tcpip models. This is all very interesting.
😂 I actually hear him coaching me in my head now when I’m learning on my own! Thanks!
Coffee break…
you always make things easer funnyyyyyy😂
Just finished the NetworkChuck Python intro course. And have to say this is the best little intro to Python that I have found on RUclips. Looking forward to seeing more episodes. When are they coming out?
Some day soon.
Watched the whole Phython series now im ready to start coding you should definitely make a part2🎉
glad to see some content about python as I'm starting to learn it
The legend is back!
man please please please continue this coures here
man pls contiunie with this awsome series it helped me so much but now i dont really know what to do next
practice
Love this quick and fun format, don't have much time for longer videos right now. Thanks Chuck !😉
Python type annotations for lists and tuples now enforce the convention.
list_of_ints: list[int] = [1,2,3,4,5]
three_type_tuple: tuple[int, str, bool] = (1, "a", True)
Think of tuples as having a well-defined structure, like the arguments to a function. While a list stores a variable number of similarly typed values.
more please thank you I enjoy watching your teaching. :)
why have you stopped uploading videos on python you were finally someone making sence
You do the best tutorials ever Chuck
I am learning Python myself and this was informative and entertaining! Thanks, NetworkChuck!
THANK YOU! Your first comment about being immutable was an AH HA moment for me. I’m trying to change the result of a betting game and could not figure out why the value changed when it’s returned. It’s changing back because it wasn’t allowed to be changed to begin with!
Extra points for mixing in the Tuples jokes with the sponsor segment.
nice man, I have wondered about it since long time ago, and it's all been answered with your videos.
Keep up making useful tips videos.
deaaaaaaaaaaaaaaaam nice how changed sooooo much at editing! :000
CHUCK, u need to make another python video RIGHT NOW!
so, the mutability thing is weird with tuples. You can mutate mutable objects inside of the tuple. But you cannot replace the object in a tuple with a new object. So strings, ints, floats, etc are immutable too so the immutability thing with tuples makes a ton of sense. But, custom objects, or even lists, are mutable. Placing a mutable object in an immutable tuple does not make it immutable.
Very weird, but it makes sense.
you explain this so clearly and in such a fun way, you are amazing!!!!!!
I know tuples are also more memory efficient by quite a bit in some cases. If you're dealing with say streams of data and it is in a collection, you will want to use a tuple where possible as an easy way to cut on memory by at least a bit. Of course nowadays this is less a concern because memory management and sending streams of data are less of a concern than in the Python 2 days but in some cases trading out tuples for lists can be pretty useful, especially if you're trying to Cythonize your Python code since those seconds add up (such as doing expensive calculations, as with neural networks and similar projects, or need quick responses, like with fast-paced games and flight tracking/management). I know when you need Python to do the same thing many times in a day, a second here or there can really add up. Unless you're big on process efficiency, you probably can get away with using lists instead even then at least 9 out of 10 times.
To be honest, if you want high performance you're not using python anyway
@@drdesten Yes, but even for cases where you can afford to use python rather than a significantly faster language, you can still drastically affect the performance of your code depending on how you write it.
You are the reason I started learning python thanks so much for these videos they are really help full
Please continue i really like this series
That all-caps question to ChatGPT cracked me up good.
Amazing video chuck
I love how you explain this. So awesome! Best teacher ever! With all these real example. Nailed it.
Whoooaaaa…. How insane is it that @NetworkChuck doesn’t post a video for a few weeks and when that video posts, it’s a topic I am studying like… right now…. Like right before I watched this video I was watching Python for Everybody’s 13 hour course video at the 5:40 marker wrapping up the Tuples lecture. The timing is just… WHAT?!
@NetworkChuck, just hire me already! You’ve basically put hours and hours into training me with these videos man. May as well put my training to work!
I have been waiting nine months for episode 10!
when will we get the for while loops
I was like when did the video end. The video was sooo good . Wee need more python Chuck 🤑
The most practical use case of tuples i.m.o. is having multiple return values from a function. Something like an error code and a message, or a succes/fail boolean and some result. Etc. Very helpful, especially when used in conjunction with tuple unpacking.
that makes sense how you would organize the lists/tuples. i usually use dictionaries to categorize, but instead i could just be using tuples! great video, as always!
you know what?! you put Me inside of a tupple, That is why I commented, liked and also subscribed! great video btw, have a nice day!