Lists & Tuples in Python (How to Use Them Effectively?) #15

  Рет қаралды 127,394

Programiz

Programiz

Күн бұрын

Пікірлер: 89
@programizstudios
@programizstudios 2 жыл бұрын
🔥 Learn Python with a more hands-on experience with Programiz PRO-interactive lessons, quizzes & challenges. Try Programiz PRO: bit.ly/right-python
@घटिया_कानून
@घटिया_कानून Жыл бұрын
100% right
@autumnleaf2768
@autumnleaf2768 10 ай бұрын
Where I can find the explanation video for the task?
@rashedzaman990
@rashedzaman990 Жыл бұрын
I have been lately watching a lot of videos but Punit, he truly stands out. His teaching method is awesome. Those who are struggling to understand Decorators in Python, I will strongly recommend them to watch Punit’s video on Decorators in Python.
@saiful_khalid
@saiful_khalid 3 жыл бұрын
We are so lucky that these videos are free. Thank you Programiz
@घटिया_कानून
@घटिया_कानून Жыл бұрын
"guruji" clearest,easiest,simplest Its great asset for students to learn python
@pandathegeneral2426
@pandathegeneral2426 3 жыл бұрын
Im getting better at coding because of this channel THANK YOU SO MUCH im going to push myself until i become a game dev!
@danielakoyleek3757
@danielakoyleek3757 2 жыл бұрын
My guy! explicit teacher. Cheers from South Sudan❤!!!
@hadeerrashad5486
@hadeerrashad5486 3 жыл бұрын
This is the BEST video I have ever watched that explained the concepts perfectly.
@kawaiikina3618
@kawaiikina3618 2 жыл бұрын
Thank you Punit and Programiz team's effort! Your videos are the best tutorials I have come across which provide clear explanation on the code structures and are sooooo easy to follow!!
@घटिया_कानून
@घटिया_कानून Жыл бұрын
The best
@tharuna6205
@tharuna6205 2 жыл бұрын
Underrated channel
@beastashwin1923
@beastashwin1923 3 жыл бұрын
This video is really helpful, short and to the point! Thanks a lot ❤️
@duongminh1972able
@duongminh1972able 3 жыл бұрын
You present in a clear way. Thank you
@adeebalamat172
@adeebalamat172 2 жыл бұрын
I can pass my test now thanks to you
@saregamapaz
@saregamapaz 3 жыл бұрын
very clear and methodical presentation...THANKS
@khaledelhoushi8834
@khaledelhoushi8834 Жыл бұрын
You can also call the length function on slicing. You can do it like this print(len(languages[0:3])).
@daviddavila8289
@daviddavila8289 Жыл бұрын
12:15 Punit, why is the item “JavaScript” printed in a different color?
@ganneruvaramroshinichitti5407
@ganneruvaramroshinichitti5407 3 жыл бұрын
thankyou sir .its really simply more explanative...
@theonlymaster9374
@theonlymaster9374 2 жыл бұрын
1. True 2. ['Hello', 'Hi', 'java', True] Traceback (most recent call last): File "", line 7, in TypeError: 'tuple' object does not support item assignment >
@edselnarvaez9667
@edselnarvaez9667 2 жыл бұрын
Punit you are the best thanks a lot !
@kiran12314
@kiran12314 3 жыл бұрын
Classes are very easy to understand
@Knochenkotzer01
@Knochenkotzer01 2 жыл бұрын
Super great content Programiz, keep it up ✨
@DigitalAcademyOnline
@DigitalAcademyOnline 3 жыл бұрын
Learning Python is something you would like to get in your skills, but you do not know where to start? This NEW channel will help you out leaning Python Programming from scratch - for complete Beginners, Intermediate and Advanced Levels
@AbdulrahmanMuttakaJunju
@AbdulrahmanMuttakaJunju Жыл бұрын
really interesting videos. however am having challenge solving a problem related to tuple, can you be of help?
@SANGITA_SINGH1981
@SANGITA_SINGH1981 3 жыл бұрын
Your videos are really very great
@sg8581
@sg8581 Жыл бұрын
Great videos, thanks a ton!
@EmereEmmanuel
@EmereEmmanuel 2 ай бұрын
My answer, hope i am doing well. 1. ["True"] 2. ["Hello", "Hi", "Java", "True"] 3. [1, 100, 4, 5]
@OptimusPrime-vy8vy
@OptimusPrime-vy8vy 4 жыл бұрын
This is really well done thank you!
@BalaKrishnan-qk2zu
@BalaKrishnan-qk2zu 3 жыл бұрын
This video is really helpful. Thanks a lot
@stefmyt5062
@stefmyt5062 3 жыл бұрын
Amazing video, sir! Very useful!
@srhrithik5259
@srhrithik5259 2 жыл бұрын
Thank you programiz
@saurav2409
@saurav2409 3 жыл бұрын
Thank u so, to this precised n to the point lecture ... 🥺
@lakshanj.kumara7648
@lakshanj.kumara7648 Жыл бұрын
mixed_list=["hello",-34,"java",True] print("1.",mixed_list[-1]) mixed_list[1]="Hi" print("2.",mixed_list) mixed_tuple=(1,3,4,5) print("3.",mixed_tuple)
@srhrithik5259
@srhrithik5259 2 жыл бұрын
Thanks a lot 🤗🤗
@kapibara2440
@kapibara2440 11 ай бұрын
Super video, thank you❤
@joyceadhiambo9977
@joyceadhiambo9977 2 жыл бұрын
you can not change the elements of a tuple .hence this is the output mixed_list=['Hello',-34,'Java',True] mixed_list[1]='Hi' print('2.',mixed_list) print('1.',mixed_list[-1]) mixed_tuple=(1,3,4,5) mixed_tuple[1]=100 print('3.',mixed_tuple)
@mohammedumair2968
@mohammedumair2968 4 жыл бұрын
Good explanation sir 👏ossom Sir please make videos on *Data structure* sir please....
@jeetkanse9855
@jeetkanse9855 3 жыл бұрын
Walla habibi
@nriezedichisom1676
@nriezedichisom1676 3 жыл бұрын
Videos are perfect
@westonholmes9503
@westonholmes9503 2 жыл бұрын
These videos are great
@mohammadabdullahaalforhad1375
@mohammadabdullahaalforhad1375 2 жыл бұрын
mixed_list = ('Hello!', -34,'java', True ) print('1.', mixed_list[0]) print('2.', mixed_list[1]) print('3.', mixed_list[2]) print('4.', mixed_list[3]) 1. Hello! 2. -34 3. java 4. True
@georg101
@georg101 4 жыл бұрын
I am waiting for more!
@sandipansarkar9211
@sandipansarkar9211 3 жыл бұрын
great explanation
@mateenbutt3180
@mateenbutt3180 3 жыл бұрын
hi, is it possible using .insert() on list, we treat list or tuple we want to add as like .extend() treats ?
@shankarsai2067
@shankarsai2067 4 жыл бұрын
Why don't we have a live interaction session with Punit sir????
@motivationda2067
@motivationda2067 2 жыл бұрын
Punit raj kumar 🤧
@gabrielladangler1722
@gabrielladangler1722 4 жыл бұрын
Awesome videos! Looking forward to the next one! :)
@ohjinyoung4931
@ohjinyoung4931 2 жыл бұрын
Very good!
@ensonev8768
@ensonev8768 3 жыл бұрын
Awesome. Keep going
@adityagupta8950
@adityagupta8950 2 жыл бұрын
sir if we want to change 2nd and last element of list at once then what we will use?.I tried this but its results in reducing of size of list.the immediate element after the first index value is only there and rest of the elements in list is removed.
@lukedsouza7
@lukedsouza7 4 жыл бұрын
Thanks Great Job!
@kyrank.4321
@kyrank.4321 3 жыл бұрын
Great videos, keep it up!!!
@ahmedyousif4782
@ahmedyousif4782 4 жыл бұрын
why the sound changed?
@abdulquadiransari7476
@abdulquadiransari7476 4 жыл бұрын
hey why the website went down . Why I am I unable to load the website?
@rayar2323
@rayar2323 4 жыл бұрын
The website is up and running now
@jitendrakasaudhan
@jitendrakasaudhan 4 жыл бұрын
I really like all your video tutorials :) its simple , clean and clear :) BTW which tool do you use to edit/create these videos ? it looks great !! :) 👍
@majidalich2947
@majidalich2947 2 жыл бұрын
1. True 2. ['Hello', ' Hi', 'Java' , 'True' ] error : you cant use assignment operator in case of tuples 3. (1,3,4,5)
@GiulioVonKerman
@GiulioVonKerman 3 жыл бұрын
How can I change the position of an item in a list?
@nithyanagendran5661
@nithyanagendran5661 3 жыл бұрын
Hello Sir, am having a doubt. I tried the following code . languages = ["Python","Java","Kotlin","C++"] languages[1:4] = ["Ruby","JS"] print(languages) and the result i got is : ------------------------------------- ['Python', 'Ruby', 'JS'] Why Kotlin didn't get printed ? what is wrong in this ?
@tizestaxd
@tizestaxd 3 жыл бұрын
because you wrote 1:4 it should be 1:3 look languages = ["Python","Java","Kotlin","C++"] languages[1:3] = ["Ruby","JS"] print(languages) result ['Python', 'Ruby', 'JS', 'C++'] I hope i helped u have a good day
@harish0000
@harish0000 4 жыл бұрын
Please also alow us to save our code in python compiler which is on your site
@Trazynn
@Trazynn 4 жыл бұрын
I understand that tuples are faster and make more efficient use of memory. But is that their only purpose? They do seem to require a lot more effort than just using a list.
@programizstudios
@programizstudios 4 жыл бұрын
No, efficiency is not the primary reason to use tuples. In fact, the difference in efficiency is insignificant for 99.9% of the applications. The primary benefit of using tuples is that it helps us create less error-prone code. For example, Imagine you own an ecommerce site and you need to send emails to all the users regarding a new policy change. To do so, you decided to store all the emails (from the database) in a collection so that you can send the emails at once. In such cases, it's better to use tuples because we know for sure that these emails won't change throughout the execution of the program. And if the tuple is accidentally modified by you or other developers, we get an error (which is a good thing). This helps us create less buggy code. Also, using a tuple makes our code more readable. It's because when we see a tuple we know for sure that this data cannot be modified.
@mateenbutt3180
@mateenbutt3180 3 жыл бұрын
Why output are same? when I use .copy() method............. old_list = [[1, 2, 3], [4, 5, 6], [7, 8, 'a']] new_list = old_list.copy() old_list[2][2] = 10 print('Old List:', old_list) print('New List:', new_list) Output: Old List: [[1, 2, 3], [4, 5, 6], [7, 8, 10]] New List: [[1, 2, 3], [4, 5, 6], [7, 8, 10]]
@AryanSingh-ju6wn
@AryanSingh-ju6wn 3 жыл бұрын
with .copy() it must not be creating a new memory location but rather linking the previous one to the new variable
@cadribopraiseoyo5636
@cadribopraiseoyo5636 3 жыл бұрын
Instructor what's your name? I like your tutorials a lot.
@mohammadabdullahaalforhad1375
@mohammadabdullahaalforhad1375 2 жыл бұрын
Thanks
@favourudoh753
@favourudoh753 3 жыл бұрын
amazing!!
@saravanaakavi2376
@saravanaakavi2376 3 жыл бұрын
will you make a video as per viewer request?
@sureshvarthya2250
@sureshvarthya2250 2 жыл бұрын
True ["Hello", "Hi", "Java", True] error it does not support for reassigning values into the tuple ,because it is immutable
@ahmedaltaf12131
@ahmedaltaf12131 4 жыл бұрын
thank you so much omg
@harshad9203
@harshad9203 2 жыл бұрын
1. 4 2. hello, hi, java, true 3. error
@praveenasurya3211
@praveenasurya3211 2 жыл бұрын
can you add subtitles too sir?
@shadoestorme
@shadoestorme 4 жыл бұрын
thank you!
@kushal-shaw-pvt
@kushal-shaw-pvt 4 жыл бұрын
Sir please teach tkinter
@ranjeet5806
@ranjeet5806 3 жыл бұрын
Answer of the Exercise : 1.True 2.Hello---- edit: it prints the whole list a error that you cant use assignment operator in case of tuples 3.1---- edit: it prints the whole tuple
@sunnyraut3243
@sunnyraut3243 3 жыл бұрын
1.True 2.Hello Hii Java True 3.Error cannot assign value to tuple
@datasciencetoday7127
@datasciencetoday7127 9 ай бұрын
@kemaketseforkssebitiela3089
@kemaketseforkssebitiela3089 5 ай бұрын
❤i think i am going somewhere😅
@karanbirsingh5924
@karanbirsingh5924 3 жыл бұрын
Lets we have 3 reviewers and 4 movies......how to code this
@emrandafadar4445
@emrandafadar4445 2 жыл бұрын
Your explaining style is very hard to understand You speak too fast You're writing your codes too fast And supporting logics aren't many And your coding font size is very small I am fully beginner, I can't catch it fast like others
How to Work with 'Text'? (Python Strings)? #16
14:25
Programiz
Рет қаралды 59 М.
Python lists, sets, and tuples explained 🍍
15:06
Bro Code
Рет қаралды 334 М.
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
Python Functions (The Only Guide You'll Need) #12
16:57
Programiz
Рет қаралды 613 М.
Python Inheritance (Make Your Code Modular!) #22
14:52
Programiz
Рет қаралды 58 М.
5 Useful F-String Tricks In Python
10:02
Indently
Рет қаралды 336 М.
Python Tutorial for Beginners 4: Lists, Tuples, and Sets
29:05
Corey Schafer
Рет қаралды 1,5 МЛН
How to Use Lists in Python
18:49
Programming with Mosh
Рет қаралды 328 М.
How variables works in Python | Explained with Animations
18:39
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН