sir as you said we cannot have tuple inside list but, please check thi - Lists are mutable, meaning their contents can be modified. - Tuples are immutable, meaning their contents cannot be modified once created. Here are some examples: Tuples within a list: my_list = [(1, 2), (3, 4), (5, 6)] # List containing tuples Lists within a tuple: my_tuple = ([1, 2], [3, 4], [5, 6]) # Tuple containing lists Even nested combinations: my_list = [(1, [2, 3]), (4, [5, 6])] # List containing tuples with lists my_tuple = ([1, 2], (3, [4, 5])) # Tuple containing lists and tuples Remember, when you have a tuple within a list, the tuple itself is immutable, but the list can still be modified. Similarly, when you have a list within a tuple, the list can be modified, but the tuple itself is immutable. Keep in mind that immutability only applies to the specific data structure, not its contents. So, in the case of a tuple containing lists, the lists can still be modified, but the tuple's structure (i.e., the order and number of its elements) cannot be changed.
Your satisfaction is our top priority, and we're thrilled to hear that you had a positive learning experience with us! If you're interested in pursuing additional learning opportunities, we encourage you to take a look at certification courses in the description box.
Tuple is faster then List (it takes less memorary, due to no insertion and deletion tuple is faster than list, tuple is faster is accessing the elements)
In Python 3 we can use : List, tuple, NumPy Arrays (homogeneous, multidimensional & mutable), rarely used Arrays using Array module in py 3.3(homogeneous, 1-D, )
at 2:18, if we try to add an entry with a duplicate key then the old value will be replaced with a new value old value is eligible for garbage collection d={} d[10]="a" #old value d[20]="b" d[10]="c"#new value print(d) o/p:{10: 'c', 20: 'b'} # tuple is faster than a list when there are more elements...... which is best java and python? #, in my opinion,both are best according to the scenario, python is weak at database layers, and Java provides more security, java doesn't support multiple inheritances as you know already
WooHoo! We are so happy you love our videos. Please do keep checking back in. We put up new videos every week on all your favorite topics. Have a good day!
You should ask like typical functions in Python, Not just blindly ask the basic questions to the Students, Today and tomorrow where is the generation is going all the 2024-2025 pass-out students are deeply coming into the coding background
WooHoo! We are so happy you love our videos. Please do keep checking back in. We put up new videos every week on all your favorite topics. Have a good day!
sir , im from tamil nadu , but me hard hearing and cant spoken , companies interview question ,i can wrote show him ? , i become data anayst and data science(mysql , Machine learning ,excel)
Hello sir I'm in indore. Yha pe python/ django ki job bhot kam h . Or mene python/django kra h . Abhi kuch or sikhu ya isko hi continue kru plzzz reply 😢😢😢😢😂
WooHoo! We are so happy you love our videos. Please do keep checking back in. We put up new videos every week on all your favorite topics. Have a good day!
🔰Enroll for Advanced Python Certification Course: bit.ly/jbkgshub7
👉Fill Out The Form To Schedule Your Python Mock: forms.gle/4n1u5hBTuwRLxRwv9
sir as you said we cannot have tuple inside list but,
please check thi
- Lists are mutable, meaning their contents can be modified.
- Tuples are immutable, meaning their contents cannot be modified once created.
Here are some examples:
Tuples within a list:
my_list = [(1, 2), (3, 4), (5, 6)] # List containing tuples
Lists within a tuple:
my_tuple = ([1, 2], [3, 4], [5, 6]) # Tuple containing lists
Even nested combinations:
my_list = [(1, [2, 3]), (4, [5, 6])] # List containing tuples with lists
my_tuple = ([1, 2], (3, [4, 5])) # Tuple containing lists and tuples
Remember, when you have a tuple within a list, the tuple itself is immutable, but the list can still be modified. Similarly, when you have a list within a tuple, the list can be modified, but the tuple itself is immutable.
Keep in mind that immutability only applies to the specific data structure, not its contents. So, in the case of a tuple containing lists, the lists can still be modified, but the tuple's structure (i.e., the order and number of its elements) cannot be changed.
As a fresher she is well prepared and she will do in future. Well done.
Your satisfaction is our top priority, and we're thrilled to hear that you had a positive learning experience with us! If you're interested in pursuing additional learning opportunities, we encourage you to take a look at certification courses in the description box.
Tuple is faster then List (it takes less memorary, due to no insertion and deletion tuple is faster than list, tuple is faster is accessing the elements)
In Python 3 we can use :
List, tuple, NumPy Arrays (homogeneous, multidimensional & mutable), rarely used Arrays using Array module in py 3.3(homogeneous, 1-D, )
at 2:18, if we try to add an entry with a duplicate key then the old value will be replaced with a new value
old value is eligible for garbage collection
d={}
d[10]="a" #old value
d[20]="b"
d[10]="c"#new value
print(d)
o/p:{10: 'c', 20: 'b'}
# tuple is faster than a list when there are more elements......
which is best java and python?
#, in my opinion,both are best according to the scenario, python is weak at database layers, and Java provides more security, java doesn't support multiple inheritances as you know already
Tuple is fast as it is immutable, she did really well 🎉🎉
WooHoo! We are so happy you love our videos. Please do keep checking back in. We put up new videos every week on all your favorite topics. Have a good day!
We can have a list inside tuple
List is slower because of its dynamic resize and tuple is faster because of its fixed range.
You're absolutely right about the performance difference between lists and tuples.
Tuple is faster
There is methods only elements
But list is also more methods
Thanks for watching our video and sharing your thoughts. Do subscribe to our channel and stay tuned for more. Cheers!
According to me list serves as an array in python
You should ask like typical functions in Python, Not just blindly ask the basic questions to the Students, Today and tomorrow where is the generation is going all the 2024-2025 pass-out students are deeply coming into the coding background
we have to use numpy for array
WooHoo! We are so happy you love our videos. Please do keep checking back in. We put up new videos every week on all your favorite topics. Have a good day!
list inside tupple is possible
Tuple is faster
Tuple is fast
Do you conduct Virtual interview ?
yes
sir , im from tamil nadu , but me hard hearing and cant spoken , companies interview question ,i can wrote show him ? , i become data anayst and data science(mysql , Machine learning ,excel)
Hello sir I'm in indore. Yha pe python/ django ki job bhot kam h . Or mene python/django kra h . Abhi kuch or sikhu ya isko hi continue kru plzzz reply 😢😢😢😢😂
Nice and informative video sir
Can you Ask the first Simpel Question Why Python 😂 and Why Django 😂?
list is fast
Tuple is fast
Tuple is faster than list
list is faster than tuple
very poor
👍🏻
thank you
tuple is faster
tuple is faster
WooHoo! We are so happy you love our videos. Please do keep checking back in. We put up new videos every week on all your favorite topics. Have a good day!