Tuples & Tuple Unpacking in Python

  Рет қаралды 22,117

Academind

Academind

Күн бұрын

Tuples store immutable data. In combination with Tuple Unpacking Python offers us great tools to create more efficient and leaner code!
Join the full Python course at 90% off: acad.link/pyth...
----------
• Go to www.academind.com and subscribe to our newsletter to stay updated and to get exclusive content & discounts
• Follow @maxedapps and @academind_real on Twitter
• Follow @academind_real on Instagram: / academind_real
• Join our Facebook community on / academindchannel
See you in the videos!
----------
Academind is your source for online education in the areas of web development, frontend web development, backend web development, programming, coding and data science! No matter if you are looking for a tutorial, a course, a crash course, an introduction, an online tutorial or any related video, we try our best to offer you the content you are looking for. Our topics include Angular, React, Vue, Html, CSS, JavaScript, TypeScript, Redux, Nuxt.js, RxJs, Bootstrap, Laravel, Node.js, Progressive Web Apps (PWA), Ionic, React Native, Regular Expressions (RegEx), Stencil, Power BI, Amazon Web Services (AWS), Firebase or other topics, make sure to have a look at this channel or at academind.com to find the learning resource of your choice!

Пікірлер: 34
@AnnieCushing
@AnnieCushing 2 жыл бұрын
This video was a lifesaver. Best explanation I've seen for tuple packing and unpacking. Thank you. 🙏
@kennethedwards814
@kennethedwards814 4 жыл бұрын
Manuel, thank you so much for your very clear explanations!!!!
@shredder_plays
@shredder_plays 5 жыл бұрын
Do a video on multithreading in python. BTW nice content man keep it up
@academind
@academind 5 жыл бұрын
Thank you Gagan, we plan to cover more Python topics in the future.
@SeamusHarper1234
@SeamusHarper1234 5 жыл бұрын
You never answered your own question why to use tuples in the first place, so here I'll give some reasons: - Tuples are faster than lists (fixed space in memory, not dynamic) - Tuples might be safer to use in your code (implied write protection) - Tuples can be used as keys in dictionaries (usecase: coordinates and values, e.g. (x, y, z): 200)
@academind
@academind 5 жыл бұрын
Thanks for sharing this. However, the focus of the video was on immutability and a little practical example to apply the concepts, that's why I didn't talk about the points you mentioned.
@Skaxarrat
@Skaxarrat 5 жыл бұрын
Also, use tuples when you want to use a group of items that will never change. An easy to understand example are weekdays. Rarely we will add/remove days from the week, so using a Tuple is better than list where you can potentially add/remove/change days
@SeamusHarper1234
@SeamusHarper1234 5 жыл бұрын
@@academind Just to clarify, i really enjoied the video and it wasn't meant as criticism. I just had this question while watching and tought others might have it, tool. Keep it up ;-)
@mstardomfinance8389
@mstardomfinance8389 4 жыл бұрын
Tuples can also be used to store dictionaries especially when retrieving streaming data from an API, such as getting crypto buy, sell, and spot prices from the coinbase API. You may want to build a trading app that will tell you when to buy and sell a particular crypto currency. You see, learning how to code has been the best thing that I have accomplished in my life. My coding language is python. I love it so much. It has changed my life. Nothing matters more to me in this world than coding in my favorite coding language, python. If you are a creative person like me, learning how to code could change your life for ever. It is amazing when people look at you as a god. It is awesome! The reason is because you can build things that people ask you to build and then show it to them a few days later. Wow! If you want to be influential in your social circle, learn how to build apps. My name is Glenford Robinson, and I am a proud and happy Python Web Developer. It all started when I paid thousands of dollars to a python developer to code a trading app for me, but come to find out it was something that I could've done myself only if I had applied myself and learn to code in python. So, I woke up and smell the coffee and said, the hell with this. I am going to learn how to code myself and build my own app. So, I did. And I have been building apps ever since in my favorite programing language. I have developed AI apps, prediction apps, apps used in the clinical laboratory setting and the list goes on. I had to write this piece to let the world know how thankful I am to the developers who developed the computer language, called Python. Thanks so much everyone for reading my thoughts about programing.
@AnnieCushing
@AnnieCushing 2 жыл бұрын
@@mstardomfinance8389 This made me smile. Get on with yo bad seff. 👊
@fer_vicius
@fer_vicius Жыл бұрын
Thanks for the explanation, now I can see it was so easyv😀
@stanislavkryshchuk9200
@stanislavkryshchuk9200 3 жыл бұрын
thank you very much!!! I have one ugly code with the same name variables, and can't understand this idea, but your explanation helps me)
@irojkozrdp7816
@irojkozrdp7816 Жыл бұрын
cool video good explanation easy to understand
@oceanNmotoWoman
@oceanNmotoWoman Жыл бұрын
well done mate cheers. Was looking for a little deeper dive into Tuple unpacking and this really helped.
@easydatascience2508
@easydatascience2508 Жыл бұрын
You can watch my playlists for Python and R.
@marciandmnd
@marciandmnd 5 жыл бұрын
Thank you
@marvhan888
@marvhan888 2 жыл бұрын
so good
@globalgrowth343
@globalgrowth343 Жыл бұрын
😊 thanks
@daeshawntaylor5855
@daeshawntaylor5855 5 жыл бұрын
What IDE is being used in this video?
@academind
@academind 5 жыл бұрын
I use Visual Studio Code.
@BrownCookieBoy
@BrownCookieBoy 4 жыл бұрын
I cant think your name without thinking it in the Spanish accent haha
@riskzerobeatz
@riskzerobeatz 5 жыл бұрын
nice :D
@jacobestright2709
@jacobestright2709 5 жыл бұрын
FC BAYERN MUNCHEN
@will2see
@will2see 4 жыл бұрын
TUPLES!!!!! not ťyuples!
@Steve-Richter
@Steve-Richter 5 жыл бұрын
I do not understand the point of python. All of this can be done using JavaScript.
@hdjfgt
@hdjfgt 5 жыл бұрын
It can be done in most languages though? Most of them better than JS
@will2see
@will2see 4 жыл бұрын
@@hdjfgt I do not understand the point of JS. All of this can be done using Python. LOL :-D But the truth is that it may be done in EVERY language.
@will2see
@will2see 4 жыл бұрын
I can't listen to this... it drives me crazy!
@academind
@academind 4 жыл бұрын
Quick tip: Don't watch it then :)
@will2see
@will2see 4 жыл бұрын
Look up how to correctly pronounce the word 'tuples' apart from other words. Thank you!
@academind
@academind 4 жыл бұрын
Thanks for the hint, I'll try to keep that in mind, the core focus of the video is on the actual content though, not on the pronunciation of single words.
@will2see
@will2see 4 жыл бұрын
@@academind Maybe you should fuck up everything you say so nobody will listen to you, isn't it? Fucking idiot!
@tomkelly8191
@tomkelly8191 4 жыл бұрын
@@will2see You are one ignorant SOB. His pronunciation of "tuple" is perfectly valid. You can't even write proper English yet have the temerity to question his presentation.
Python - List Comprehensions Tutorial
18:53
Academind
Рет қаралды 39 М.
Python dataclasses will save you HOURS, also featuring attrs
8:50
POV: Your kids ask to play the claw machine
00:20
Hungry FAM
Рет қаралды 9 МЛН
SCHOOLBOY. Мама флексит 🫣👩🏻
00:41
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 6 МЛН
GTA 5 vs GTA San Andreas Doctors🥼🚑
00:57
Xzit Thamer
Рет қаралды 26 МЛН
Cute kitty gadgets 💛
00:24
TheSoul Music Family
Рет қаралды 21 МЛН
You might not need useEffect() ...
21:45
Academind
Рет қаралды 159 М.
Tuple Unpacking in Python | Multiple Assignment in Python
11:36
Fabio Musanni - Programming Channel
Рет қаралды 1 М.
Anaconda (Conda) for Python - What & Why?
26:10
Academind
Рет қаралды 229 М.
Python - Accessing Nested Dictionary Keys
24:48
Academind
Рет қаралды 183 М.
15 Python Projects in Under 15 Minutes (Code Included)
12:37
Tech With Tim
Рет қаралды 2 МЛН
Python lists, sets, and tuples explained 🍍
15:06
Bro Code
Рет қаралды 267 М.
Unpacking a Tuple in Python
9:29
Neso Academy
Рет қаралды 13 М.
Unpacking Operators in Python: What are * and **?
12:35
NeuralNine
Рет қаралды 10 М.
Vector and Matrix in Python | python tutorial |
9:23
Pythonist
Рет қаралды 54 М.
All Python Syntax in 25 Minutes - Tutorial
24:59
Beau
Рет қаралды 38 М.
POV: Your kids ask to play the claw machine
00:20
Hungry FAM
Рет қаралды 9 МЛН