Difference Between List and Tuple in Python | Python Interview Questions and Answers | List vs Tuple

Sdílet
Vložit
  • čas přidán 25. 12. 2021
  • Difference Between List and Tuple in Python | Python Interview Questions and Answers | List vs Tuple
    This video is part of 'difference between programming terms.' and Python Interview Questions and Answers series. In this video, I have explained about the differences between list and tuple. This is most important interview question asked in python .Let's see it's perfect answer.
    topics covered:-
    1) List vs Tuple in Hindi
    2) What is Difference Between List and Tuple
    Hello guys, welcome to codeyug to build your computer science
    skills.Here,you will learn programming tutorials and computer science tutorials from basics to advanced.
    source code :-
    Thanks for watching this video
    Subscribe codeyug for more programming tutorials.
    bit.ly/3h3Bv0c
    About this channel:-
    This channel provides free tutorials on programming,coding,web development.There are programming tutorials which covers from basics to advanced absolutely in hindi.
    Our social links:-
    you tube:- bit.ly/3h3Bv0c
    instagram:- bit.ly/3mlspQu
    gmail :- shantanukejkar@gmail.com
    creator:-
    -----shantanu kejkar------
    #list #tuple #programming #languages #coding #codeyug

Komentáře • 87

  • @Codeyug
    @Codeyug  Před rokem +9

    We can unpack list also.

    • @barsaprusty4939
      @barsaprusty4939 Před rokem +3

      I was just going to scold u black and blue for that🤣

    • @Dabber7
      @Dabber7 Před rokem +1

      a,b,c,d=[21,32,93,'hello',5]
      print(c)
      a,b,c,d='ABC',21,32,93,'hello',5
      print(c)
      I am facing the same issue for both

    • @barsaprusty4939
      @barsaprusty4939 Před rokem +1

      @@Dabber7 thats what happens.. we can unpack list too... not everyone who teaches in youTube is correct all the time...

    • @sagarmasal1242
      @sagarmasal1242 Před rokem

      yes its correct
      it is possible to unpack list also.
      list and tuple both we can do packing and unpacking

    • @luckyrajput2642
      @luckyrajput2642 Před 3 měsíci +1

      What is meant by pack/unpack ? 😅😅

  • @parthdange755
    @parthdange755 Před rokem +14

    i dont usually comment on youtube but man what a great teaching every line with example...subscibing you

    • @Codeyug
      @Codeyug  Před rokem +1

      Thanks and please do share..

  • @MahbubAlam-ey7nz
    @MahbubAlam-ey7nz Před rokem +8

    out of the world explanation

  • @shyamkaladlagopal2
    @shyamkaladlagopal2 Před rokem +2

    well explanation sir....

  • @sumantwankhede
    @sumantwankhede Před rokem +4

    Nice vdo..we can do comprehension of tuple by using its type
    print(tuple(i*2 for i in range(2)) ) # Tuple (0, 2)
    print({i:i*2 for i in range(2)} ) # dict {0: 0, 1: 2}
    l = [2,4,6]
    print ([i*2 for i in l if i > 1] )# List [4, 8, 12]
    print({i*2 for i in l if i > 1 }) # set {8, 4, 12}

    • @Codeyug
      @Codeyug  Před rokem +5

      But, actually it is generator and not comprehension.. Please check type here...

  • @johnsnow007
    @johnsnow007 Před rokem +1

    Thank you so much darling 💓

  • @divyrajverma8286
    @divyrajverma8286 Před 8 měsíci +2

    हर हर महादेव जय माँ भवानी जय श्रीराम जय माँ सीता जय हनुमानजी 🙏🙏🙏🙏🙏❤❤❤❤❤❤❤❤🚩🚩🚩🚩🚩🚩🚩🚩🚩🚩

  • @kailasha1310
    @kailasha1310 Před 2 lety +3

    Very nice thankyou so much it was realy different from others video

    • @Codeyug
      @Codeyug  Před 2 lety

      Thank you.. Please share with friends..

  • @jobsenclave9991
    @jobsenclave9991 Před 2 lety +1

    Superb video. Very informative.

  • @Rahul_Patil_11
    @Rahul_Patil_11 Před rokem +2

    Kaash aapkee jaisa sir hamare college m hota🥹🙂

  • @ravijeetsingh5135
    @ravijeetsingh5135 Před rokem +1

    Nice

  • @gaurav6997
    @gaurav6997 Před rokem +2

    Your explanation is amazing

    • @Codeyug
      @Codeyug  Před rokem

      Thanks and check playlists please

  • @riyasaxena5210
    @riyasaxena5210 Před 9 měsíci

    Thanks 👍😊

  • @VishalDubey-oi3rq
    @VishalDubey-oi3rq Před rokem +1

    nyc but we can unpack list also.. try it guys as same as tuple

  • @vintagex4350
    @vintagex4350 Před rokem +1

    Your teaching techniques is too good

  • @shubhangimahajan5089
    @shubhangimahajan5089 Před rokem +1

    Very clear explanation Sir👍

  • @gautamagarwal9761
    @gautamagarwal9761 Před rokem +1

    Best video 🙌

    • @Codeyug
      @Codeyug  Před rokem

      Thank you and keep going..

  • @williamjayaraj2244
    @williamjayaraj2244 Před rokem +1

    Good explanation. Thanks.

  • @shubhpatil18
    @shubhpatil18 Před rokem +1

    Nace presentation brother appreciate

    • @Codeyug
      @Codeyug  Před rokem

      Keep watching and keep learning

  • @earth_1943
    @earth_1943 Před rokem +1

    We can unpack list like tuple I am able to do it .

  • @p.krajput0601
    @p.krajput0601 Před rokem +1

    Great 👍❤️

  • @sudippandit3828
    @sudippandit3828 Před rokem +1

    thank you sir

  • @pareshranjanrout9439
    @pareshranjanrout9439 Před 5 měsíci +1

    ❤ Thank you Bhai

    • @Codeyug
      @Codeyug  Před 4 měsíci

      Please check playlist section of this channel

  • @vintagex4350
    @vintagex4350 Před rokem +1

    Osm brother

  • @InfotechSuraj
    @InfotechSuraj Před 2 lety +2

    Amazing🙏

    • @Codeyug
      @Codeyug  Před 2 lety

      Thank you so much.. Keep learning from my channel. There are number of playlists

  • @AyeshaKhan-sj5eb
    @AyeshaKhan-sj5eb Před rokem +1

    It is very good👍

    • @Codeyug
      @Codeyug  Před rokem

      Thank you and keep learning

  • @gajananchapole1607
    @gajananchapole1607 Před rokem +1

    Very nice

    • @Codeyug
      @Codeyug  Před rokem

      Thanks...you can learn python from this channel

  • @fabeezsm7056
    @fabeezsm7056 Před 5 měsíci

    we can unpack list and tuples . when i tried for output both came without error. i was wondering what am i wrong or my computer is

  • @shrikantgedam2900
    @shrikantgedam2900 Před 3 měsíci +1

    i tried unpacking with list as you said and it works.... how it is possible
    j, k, l, m, = [1, 5.4, 'abc', 2+3j]
    print(j)
    print(k)
    print(l)
    print(m)

    • @Codeyug
      @Codeyug  Před 3 měsíci

      Working is changed into new version. I have also commented in the same video and pinned it

  • @KartikPandeyVlogs
    @KartikPandeyVlogs Před 2 lety

    I was thinking packing n unpacking is able in list

    • @Codeyug
      @Codeyug  Před 2 lety

      Now, it's cleared... Right?

    • @KartikPandeyVlogs
      @KartikPandeyVlogs Před 2 lety

      @@Codeyug yes and this ques was in my exam yesterday thanks ❤

  • @samrat.02
    @samrat.02 Před rokem

    Good expl

  • @nileshsinha957
    @nileshsinha957 Před 5 měsíci

    unpacking can be happen in list

  • @engineeringlife5391
    @engineeringlife5391 Před rokem +1

    But Maine list ke liye try kiya . Replit(online) pe .
    Unpacking ho raha hai . Pls help

    • @Codeyug
      @Codeyug  Před rokem

      Unpack hota hai... It depends on version I guess.. Comments check kro.

  • @kshitijpatil4133
    @kshitijpatil4133 Před 6 měsíci +1

    sir, which software are you using for code in this video

  • @johnmartin9329
    @johnmartin9329 Před rokem +1

    aa,ba,ca,da=[1,5,3,4]
    print(aa,ba,ca,da)
    a,b,c,d=(1,2,4,5)
    print(a,b,c,d)
    both are giving same result in python 3.0 why

    • @Codeyug
      @Codeyug  Před rokem +1

      Sorry, we can unpack tuple.. I guess, I did mistake.

  • @yashanksaini3694
    @yashanksaini3694 Před měsícem +1

    L = ['hello' , 23 , 30 , 'ram']
    a,b,c,d = L
    print (b)
    unpacking ho rhi h

    • @Codeyug
      @Codeyug  Před měsícem

      Yess... Please check my comment below the video

  • @skchannel2088
    @skchannel2088 Před 5 měsíci +1

    Modification kelye list chahea ya tuple?

  • @Chinmoy348
    @Chinmoy348 Před 2 lety +1

    Nice video bro

    • @Codeyug
      @Codeyug  Před 2 lety

      Thank you.. If Anything required, text me..

    • @Chinmoy348
      @Chinmoy348 Před 2 lety

      @@Codeyug sure bro

  • @a.agaming097
    @a.agaming097 Před rokem +1

    At 6:53 you didn't provide parenthesis for tuple, then how can you define that tuple can be unpacked. I understand that the output will be the same but I am just trying to indicate your mistake.

    • @Codeyug
      @Codeyug  Před rokem +1

      var1, var2, var3 = 10,20,30 is unpacking of tuple. I don't think there is a mistake.

  • @samrat.02
    @samrat.02 Před rokem

    Hi bro oops in python explan 😊😊plz

    • @Codeyug
      @Codeyug  Před rokem

      Full playlist hai bro..

    • @samrat.02
      @samrat.02 Před rokem

      Thank you bro

    • @Codeyug
      @Codeyug  Před rokem

      Mila kya?

    • @samrat.02
      @samrat.02 Před rokem

      @@Codeyug yes bro mil gaya thank you bro

    • @Codeyug
      @Codeyug  Před rokem

      @@samrat.02 'oop using python codeyug' esse bhi mil jayega

  • @Mykiti271
    @Mykiti271 Před rokem +1

    Bro plzz muj se insta pr rbta kren ya whatsapp prr muje python K bary mein ap se jan kari leni ha

  • @prabinasunani4021
    @prabinasunani4021 Před rokem +1

    Thank you sir

  • @shaikmuheeb5526
    @shaikmuheeb5526 Před rokem +1

    Nice