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.
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!!
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
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 !! :) 👍
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.
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)
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 ?
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
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.
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.
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
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
🔥 Learn Python with a more hands-on experience with Programiz PRO-interactive lessons, quizzes & challenges.
Try Programiz PRO: bit.ly/right-python
100% right
Where I can find the explanation video for the task?
We are so lucky that these videos are free. Thank you Programiz
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.
Im getting better at coding because of this channel THANK YOU SO MUCH im going to push myself until i become a game dev!
"guruji"
clearest,easiest,simplest
Its great asset for students
to learn python
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
This is the BEST video I have ever watched that explained the concepts perfectly.
This video is really helpful, short and to the point! Thanks a lot ❤️
My guy! explicit teacher. Cheers from South Sudan❤!!!
You present in a clear way. Thank you
Underrated channel
12:15 Punit, why is the item “JavaScript” printed in a different color?
You can also call the length function on slicing. You can do it like this print(len(languages[0:3])).
very clear and methodical presentation...THANKS
really interesting videos. however am having challenge solving a problem related to tuple, can you be of help?
Super great content Programiz, keep it up ✨
I can pass my test now thanks to you
thankyou sir .its really simply more explanative...
Punit you are the best thanks a lot !
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
Videos are perfect
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 !! :) 👍
Classes are very easy to understand
Thank you programiz
This is really well done thank you!
1. True
2. ['Hello', 'Hi', 'java', True]
Traceback (most recent call last):
File "", line 7, in
TypeError: 'tuple' object does not support item assignment
>
why the sound changed?
Great videos, thanks a ton!
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.
Amazing video, sir! Very useful!
Your videos are really very great
hi, is it possible using .insert() on list, we treat list or tuple we want to add as like .extend() treats ?
This video is really helpful. Thanks a lot
Very good!
Thanks Great Job!
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)
Thanks a lot 🤗🤗
These videos are great
How can I change the position of an item in a list?
Super video, thank you❤
Thank u so, to this precised n to the point lecture ... 🥺
1. True
2. ['Hello', ' Hi', 'Java' , 'True' ]
error : you cant use assignment operator in case of tuples
3. (1,3,4,5)
I am waiting for more!
Good explanation sir 👏ossom
Sir please make videos on *Data structure* sir please....
Walla habibi
hey why the website went down . Why I am I unable to load the website?
The website is up and running now
Awesome. Keep going
Awesome videos! Looking forward to the next one! :)
Great videos, keep it up!!!
great explanation
True
["Hello", "Hi", "Java", True]
error it does not support for reassigning values into the tuple ,because it is immutable
Why don't we have a live interaction session with Punit sir????
Punit raj kumar 🤧
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)
My answer, hope i am doing well.
1. ["True"]
2. ["Hello", "Hi", "Java", "True"]
3. [1, 100, 4, 5]
Please also alow us to save our code in python compiler which is on your site
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 ?
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
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
amazing!!
Thanks
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]]
with .copy() it must not be creating a new memory location but rather linking the previous one to the new variable
thank you!
can you add subtitles too sir?
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.
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.
will you make a video as per viewer request?
thank you so much omg
Instructor what's your name? I like your tutorials a lot.
1. 4
2. hello, hi, java, true
3. error
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
Sir please teach tkinter
Lets we have 3 reviewers and 4 movies......how to code this
1.True
2.Hello Hii Java True
3.Error cannot assign value to tuple
❤i think i am going somewhere😅
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