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

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

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 11 ай бұрын
Where I can find the explanation video for the task?
@saiful_khalid
@saiful_khalid 3 жыл бұрын
We are so lucky that these videos are free. Thank you Programiz
@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.
@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!
@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
@hadeerrashad5486
@hadeerrashad5486 3 жыл бұрын
This is the BEST video I have ever watched that explained the concepts perfectly.
@danielakoyleek3757
@danielakoyleek3757 2 жыл бұрын
My guy! explicit teacher. Cheers from South Sudan❤!!!
@घटिया_कानून
@घटिया_कानून Жыл бұрын
"guruji" clearest,easiest,simplest Its great asset for students to learn python
@beastashwin1923
@beastashwin1923 4 жыл бұрын
This video is really helpful, short and to the point! Thanks a lot ❤️
@tharuna6205
@tharuna6205 3 жыл бұрын
Underrated channel
@duongminh1972able
@duongminh1972able 3 жыл бұрын
You present in a clear way. Thank you
@Knochenkotzer01
@Knochenkotzer01 2 жыл бұрын
Super great content Programiz, keep it up ✨
@saregamapaz
@saregamapaz 3 жыл бұрын
very clear and methodical presentation...THANKS
@daviddavila8289
@daviddavila8289 2 жыл бұрын
12:15 Punit, why is the item “JavaScript” printed in a different color?
@ganneruvaramroshinichitti5407
@ganneruvaramroshinichitti5407 3 жыл бұрын
thankyou sir .its really simply more explanative...
@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 !! :) 👍
@stefmyt5062
@stefmyt5062 3 жыл бұрын
Amazing video, sir! Very useful!
@adeebalamat172
@adeebalamat172 2 жыл бұрын
I can pass my test now thanks to you
@sg8581
@sg8581 2 жыл бұрын
Great videos, thanks a ton!
@khaledelhoushi8834
@khaledelhoushi8834 Жыл бұрын
You can also call the length function on slicing. You can do it like this print(len(languages[0:3])).
@edselnarvaez9667
@edselnarvaez9667 2 жыл бұрын
Punit you are the best thanks a lot !
@AbdulrahmanMuttakaJunju
@AbdulrahmanMuttakaJunju Жыл бұрын
really interesting videos. however am having challenge solving a problem related to tuple, can you be of help?
@SANGITA_SINGH1981
@SANGITA_SINGH1981 4 жыл бұрын
Your videos are really very great
@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
@saurav2409
@saurav2409 3 жыл бұрын
Thank u so, to this precised n to the point lecture ... 🥺
@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.
@westonholmes9503
@westonholmes9503 2 жыл бұрын
These videos are great
@georg101
@georg101 4 жыл бұрын
I am waiting for more!
@kiran12314
@kiran12314 3 жыл бұрын
Classes are very easy to understand
@nriezedichisom1676
@nriezedichisom1676 4 жыл бұрын
Videos are perfect
@mohammedumair2968
@mohammedumair2968 4 жыл бұрын
Good explanation sir 👏ossom Sir please make videos on *Data structure* sir please....
@jeetkanse9855
@jeetkanse9855 3 жыл бұрын
Walla habibi
@kyrank.4321
@kyrank.4321 3 жыл бұрын
Great videos, keep it up!!!
@ohjinyoung4931
@ohjinyoung4931 2 жыл бұрын
Very good!
@srhrithik5259
@srhrithik5259 2 жыл бұрын
Thank you programiz
@mateenbutt3180
@mateenbutt3180 3 жыл бұрын
hi, is it possible using .insert() on list, we treat list or tuple we want to add as like .extend() treats ?
@kapibara2440
@kapibara2440 Жыл бұрын
Super video, thank you❤
@ensonev8768
@ensonev8768 3 жыл бұрын
Awesome. Keep going
@ahmedyousif4782
@ahmedyousif4782 4 жыл бұрын
why the sound changed?
@gabrielladangler1722
@gabrielladangler1722 4 жыл бұрын
Awesome videos! Looking forward to the next one! :)
@srhrithik5259
@srhrithik5259 2 жыл бұрын
Thanks a lot 🤗🤗
@lukedsouza7
@lukedsouza7 4 жыл бұрын
Thanks Great Job!
@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
@sandipansarkar9211
@sandipansarkar9211 4 жыл бұрын
great explanation
@shankarsai2067
@shankarsai2067 4 жыл бұрын
Why don't we have a live interaction session with Punit sir????
@motivationda2067
@motivationda2067 2 жыл бұрын
Punit raj kumar 🤧
@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 >
@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
@favourudoh753
@favourudoh753 3 жыл бұрын
amazing!!
@GiulioVonKerman
@GiulioVonKerman 3 жыл бұрын
How can I change the position of an item in a list?
@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)
@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.
@majidalich2947
@majidalich2947 3 жыл бұрын
1. True 2. ['Hello', ' Hi', 'Java' , 'True' ] error : you cant use assignment operator in case of tuples 3. (1,3,4,5)
@sureshvarthya2250
@sureshvarthya2250 2 жыл бұрын
True ["Hello", "Hi", "Java", True] error it does not support for reassigning values into the tuple ,because it is immutable
@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
@saravanaakavi2376
@saravanaakavi2376 3 жыл бұрын
will you make a video as per viewer request?
@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)
@EmereEmmanuel
@EmereEmmanuel 3 ай бұрын
My answer, hope i am doing well. 1. ["True"] 2. ["Hello", "Hi", "Java", "True"] 3. [1, 100, 4, 5]
@shadoestorme
@shadoestorme 4 жыл бұрын
thank you!
@ahmedaltaf12131
@ahmedaltaf12131 4 жыл бұрын
thank you so much omg
@cadribopraiseoyo5636
@cadribopraiseoyo5636 3 жыл бұрын
Instructor what's your name? I like your tutorials a lot.
@mohammadabdullahaalforhad1375
@mohammadabdullahaalforhad1375 2 жыл бұрын
Thanks
@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
@praveenasurya3211
@praveenasurya3211 2 жыл бұрын
can you add subtitles too sir?
@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
@datasciencetoday7127
@datasciencetoday7127 10 ай бұрын
@karanbirsingh5924
@karanbirsingh5924 3 жыл бұрын
Lets we have 3 reviewers and 4 movies......how to code this
@kushal-shaw-pvt
@kushal-shaw-pvt 4 жыл бұрын
Sir please teach tkinter
@harshad9203
@harshad9203 3 жыл бұрын
1. 4 2. hello, hi, java, true 3. error
@sunnyraut3243
@sunnyraut3243 3 жыл бұрын
1.True 2.Hello Hii Java True 3.Error cannot assign value to tuple
@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
@relaxingmoments-787
@relaxingmoments-787 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
@kemaketseforkssebitiela3089
@kemaketseforkssebitiela3089 6 ай бұрын
❤i think i am going somewhere😅
How to Work with 'Text'? (Python Strings)? #16
14:25
Programiz
Рет қаралды 59 М.
Python lists, sets, and tuples explained 🍍
15:06
Bro Code
Рет қаралды 354 М.
ССЫЛКА НА ИГРУ В КОММЕНТАХ #shorts
0:36
Паша Осадчий
Рет қаралды 8 МЛН
«Жат бауыр» телехикаясы І 30 - бөлім | Соңғы бөлім
52:59
Qazaqstan TV / Қазақстан Ұлттық Арнасы
Рет қаралды 340 М.
Python Dictionaries: {key: value} Pairs  #17
9:07
Programiz
Рет қаралды 80 М.
10 Important Python Concepts In 20 Minutes
18:49
Indently
Рет қаралды 462 М.
Python Functions (The Only Guide You'll Need) #12
16:57
Programiz
Рет қаралды 623 М.
Python 101:  Learn These MUST KNOW List Features
22:15
Tech With Tim
Рет қаралды 92 М.
Coding Interviews Be Like
5:31
Nicholas T.
Рет қаралды 6 МЛН
25 nooby Python habits you need to ditch
9:12
mCoding
Рет қаралды 1,8 МЛН
How I Would Learn Python FAST (if I could start over)
12:19
Decorators in Python (Easy to Understand Guide) #31
15:23
Programiz
Рет қаралды 59 М.
Please Master These 10 Python Functions…
22:17
Tech With Tim
Рет қаралды 263 М.
ССЫЛКА НА ИГРУ В КОММЕНТАХ #shorts
0:36
Паша Осадчий
Рет қаралды 8 МЛН