We dont have auch concept in python Han cpp main hai Yi aik tarah ka while loop ke tarah kaam krtha hai Han aik difference hai wo yi Do while 1 bar run hoga. Thats the main difference
how does python handle memory management for list and tuples ? how python array module differ from lists or tuple when handlimg large collections of data?
As we know List is mutable so python dynamically adjusts their memory For exmaple We add some item in list so python allocates more memory etc Now come to the 2nd one Tuple is immutable so python allocates a fixed amount of memory when it's created
If we have already list in python then why python introduce array module ??? And the Second thing is why python use everything differ from other languages ???
Sometimes, we need to work with data structures that store data of the same type. For example, when studying data structures, understanding how computers store data in a linear form is important. This is where arrays come into play. We don't use lists in such cases because lists are dynamic and come with many built-in functions. While these features make lists flexible and powerful, they also abstract away the underlying details of data storage. This can make it harder to grasp the fundamental concepts of data structures and memory management. If someone asks why Python provides the array module when we already have lists, the reason is: Arrays are better for understanding low-level concepts like contiguous memory allocation and efficient data access, which are essential in learning how data structures work. So, arrays serve a specific purpose, especially when learning or working with data structures, while lists are more suitable for general-purpose programming
Mashallah well explained ❤❤❤
Masahallah
Zabr10 ❤😊
Our Trainer for today is Hussain. you are doing great Hussain. keep it up
Sir exception handling samja do
Yes
Saad exception handling comment main nahi smjha sakhta inshallah
Video banak upload kr dain gay
Sir do while loop kiya karta hai
We dont have auch concept in python
Han cpp main hai
Yi aik tarah ka while loop ke tarah kaam krtha hai
Han aik difference hai wo yi
Do while 1 bar run hoga.
Thats the main difference
how does python handle memory management for list and tuples ?
how python array module differ from lists or tuple when handlimg large collections of data?
As we know
List is mutable so python dynamically adjusts their memory
For exmaple
We add some item in list so python allocates more memory etc
Now come to the 2nd one
Tuple is immutable so python allocates a fixed amount of memory when it's created
For your 2nd question the
I would say
Array is fixed
And the list is dynamic thats it
@@Hussain-o6k thats great 👌 , TYSM and best of luck for your upcoming sessions.
@@hammad_ahmad01thanku sir
Let me know if you have any doubts
Keep watching ❤❤❤
If we have already list in python then why python introduce array module ???
And the Second thing is why python use everything differ from other languages ???
Arrays store element of same datatype whereas in list contains mixed data type.
Sometimes, we need to work with data structures that store data of the same type. For example, when studying data structures, understanding how computers store data in a linear form is important. This is where arrays come into play.
We don't use lists in such cases because lists are dynamic and come with many built-in functions. While these features make lists flexible and powerful, they also abstract away the underlying details of data storage. This can make it harder to grasp the fundamental concepts of data structures and memory management.
If someone asks why Python provides the array module when we already have lists, the reason is:
Arrays are better for understanding low-level concepts like contiguous memory allocation and efficient data access, which are essential in learning how data structures work.
So, arrays serve a specific purpose, especially when learning or working with data structures, while lists are more suitable for general-purpose programming
@@msharykhan53 I'm sorryI didn't quite understand your second question. Could you please clarify what you mean by 'different' in this context?