Lec 7: Python Data Structures: Lists and Tuples (Part 1)

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ม.ค. 2025

ความคิดเห็น • 17

  • @HunainHashim
    @HunainHashim วันที่ผ่านมา +1

    Mashallah well explained ❤❤❤

  • @zeeshanhabib2141
    @zeeshanhabib2141 วันที่ผ่านมา

    Masahallah

  • @younasrelaxingmusic4194
    @younasrelaxingmusic4194 วันที่ผ่านมา

    Zabr10 ❤😊

  • @sheficialIH
    @sheficialIH  วันที่ผ่านมา

    Our Trainer for today is Hussain. you are doing great Hussain. keep it up

  • @Saadkhattak00
    @Saadkhattak00 วันที่ผ่านมา +1

    Sir exception handling samja do

    • @Hussain-o6k
      @Hussain-o6k วันที่ผ่านมา

      Yes
      Saad exception handling comment main nahi smjha sakhta inshallah
      Video banak upload kr dain gay

  • @Saadkhattak00
    @Saadkhattak00 วันที่ผ่านมา +1

    Sir do while loop kiya karta hai

    • @Hussain-o6k
      @Hussain-o6k วันที่ผ่านมา

      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

  • @hammad_ahmad01
    @hammad_ahmad01 วันที่ผ่านมา

    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?

    • @Hussain-o6k
      @Hussain-o6k วันที่ผ่านมา +1

      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

    • @Hussain-o6k
      @Hussain-o6k วันที่ผ่านมา +1

      For your 2nd question the
      I would say
      Array is fixed
      And the list is dynamic thats it

    • @hammad_ahmad01
      @hammad_ahmad01 วันที่ผ่านมา

      @@Hussain-o6k thats great 👌 , TYSM and best of luck for your upcoming sessions.

    • @Hussain-o6k
      @Hussain-o6k วันที่ผ่านมา

      ​@@hammad_ahmad01thanku sir
      Let me know if you have any doubts
      Keep watching ❤❤❤

  • @msharykhan53
    @msharykhan53 วันที่ผ่านมา

    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 ???

    • @sheficialIH
      @sheficialIH  17 ชั่วโมงที่ผ่านมา

      Arrays store element of same datatype whereas in list contains mixed data type.

    • @Hussain-o6k
      @Hussain-o6k 15 ชั่วโมงที่ผ่านมา

      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

    • @Hussain-o6k
      @Hussain-o6k 15 ชั่วโมงที่ผ่านมา

      @@msharykhan53 I'm sorryI didn't quite understand your second question. Could you please clarify what you mean by 'different' in this context?