Это видео недоступно.
Сожалеем об этом.

Shallow Copy Vs Deep Copy in Python

Поделиться
HTML-код
  • Опубликовано: 14 авг 2024
  • guthub: github.com/kri...
    Evolve for GATE 2022 | CS/IT: bit.ly/3svw5Cm
    Demo Class:
    CS/IT: unacademy.com/...
    Use Code: KN06
    ⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I've been using Kite for a few months and I love it! www.kite.com/g...
    All Playlist In My channel
    Interview Playlist: • Machine Learning Inter...
    Complete DL Playlist: • Complete Road Map To P...
    Julia Playlist: • Tutorial 1- Introducti...
    Complete ML Playlist : • Complete Machine Learn...
    Complete NLP Playlist: • Natural Language Proce...
    Docker End To End Implementation: • Docker End to End Impl...
    Live stream Playlist: • Pytorch
    Machine Learning Pipelines: • Docker End to End Impl...
    Pytorch Playlist: • Pytorch
    Feature Engineering : • Feature Engineering
    Live Projects : • Live Projects
    Kaggle competition : • Kaggle Competitions
    Mongodb with Python : • MongoDb with Python
    MySQL With Python : • MYSQL Database With Py...
    Deployment Architectures: • Deployment Architectur...
    Amazon sagemaker : • Amazon SageMaker
    Please donate if you want to support the channel through GPay UPID,
    Gpay: krishnaik06@okicici
    Telegram link: t.me/joinchat/...
    Please join as a member in my channel to get additional benefits like materials in Data Science, live streaming for Members and many more
    / @krishnaik06
    Please do subscribe my other channel too
    / @krishnaikhindi
    Connect with me here:
    Twitter: / krishnaik06
    Facebook: / krishnaik06
    instagram: / krishnaik06

Комментарии • 82

  • @asimgiri4269
    @asimgiri4269 3 года назад +12

    I'm just a beginner to Python but still it was soo clear to me. Thank You for explaining it soo easily

  • @helpingprogramming134
    @helpingprogramming134 3 года назад +12

    Great Explanation now everything is clear, and we can also check reference no by using id(lst1) and id(lst2) it show the reference number. 🙂👍

  • @ivansaiji
    @ivansaiji 3 года назад +11

    I feel you could have shown visuals on the memory allocation for the nested lists part.
    The whole point as I inferred from your video is that if you have a shallow copy it will allocate space in memory for two lists but the lists will be pointing to the same items, whereas if you do it with a deep copy then new objects will be created and that's why they will be independent like that. Am I right?
    I just think you didn't stress this point as well as you could have.

    • @DhavalAhir10
      @DhavalAhir10 11 месяцев назад

      In Python 1000 Same List Create 1000 new Memory location... Python can't take risk with mutable objects.

  • @zahidakitchentreats9719
    @zahidakitchentreats9719 2 года назад +9

    Hello Krish, I think the whole concept relies on the following points.
    = -> in 1d or 2d creates an object of the same memory location. Changes reflect
    list.copy() in 1d -> copies the value into new object. Changes do not reflect
    list.copy() in 2d -> copies the object in a object into new object. Changes reflect
    copy.deepcopy and copy.copy() works for 2d only.
    copy.deepcopy() -> Creates new object and inserts copy of the objects. Changes do not reflect
    copy.copy() - > Creates new object and inserts the original objects. Changes reflect
    In short, we need to see if we are putting copy/original objects.

  • @chillmathematician3303
    @chillmathematician3303 3 года назад +18

    this 12 minutes is better than 2 hours lecturer

  • @saikrishnavadali05
    @saikrishnavadali05 3 года назад +1

    One tutor explained this for 1.5 Hr. Understood nothing.. This video is much much better than that's guy's boring explanation.. Very clear and very helpful.. Learnt the essence in this 12 minutes

  • @dhairyadaga1725
    @dhairyadaga1725 3 года назад +2

    Simple and Clear to the point .

  • @ascutecoupleslove
    @ascutecoupleslove 17 дней назад

    Thanks for the explanation..you really emphasised on the point it needed the most!

  • @malikhaider9084
    @malikhaider9084 4 часа назад

    love uh this is the main concept which i wanna get thank uh thank uh soo much

  • @nikhilkothiyal
    @nikhilkothiyal 4 месяца назад +1

    Sir can we call the copy (using assignment operator),a shallow copy

  • @gurubalavigneshnatarajan3817
    @gurubalavigneshnatarajan3817 6 месяцев назад

    Great explanation, now I am clear with the topic of shallow and deep copy . Thank you so much 🙏

  • @ZahidHasan-cc8tf
    @ZahidHasan-cc8tf 3 года назад +3

    Sir, could you please do complete nosql course series from intermediate to advanced?

  • @dashingagg1
    @dashingagg1 Год назад

    Thanks a lot bhai. ye shallow copy aur deepcopy ka concept hi smjh nai aa raha tha bht time se.

  • @madhavithorvat6803
    @madhavithorvat6803 3 месяца назад

    Thank you.. Your explanation is so clear and understandable

  • @yogeerao9149
    @yogeerao9149 Год назад

    previous i just ignore this topic because i thought it was big and complicated but i understand how simple this.. Thank You Bro :-)

  • @mdhasnat8395
    @mdhasnat8395 Год назад

    The explanation was vary clear. Thank you so much for your time.

  • @ShubhamKumar-xt3vi
    @ShubhamKumar-xt3vi Год назад

    You made it very easy to understand.

  • @noco04TheGamer
    @noco04TheGamer Год назад

    Thank you for explaining it so easily!

  • @mayflowerlily5326
    @mayflowerlily5326 3 года назад +1

    Hi Krish your channel is very helpful for all DS aspirants like me. Request you to make a video on the system configurations needed for deep learning projects and is it better to buy system or assemble myself as buying a laptop is out of my budget. I am looking to buy a system for my deep.learning projects. Thank you

  • @raneshmitra8156
    @raneshmitra8156 3 года назад

    Fabulous explanation of a very complicated topic of Python....

  • @adityamathur2284
    @adityamathur2284 3 года назад

    Very nice explanation, I was confused but this video helps a lot! Thanks😊

  • @Gayathri-i5p
    @Gayathri-i5p Месяц назад

    Summary:
    1a) Deep copy: multiple 1 to 1 relationships from variable to memory.
    1b) Shallow Copy: many-to-one relationships from variables to memory.
    2) In a normal list, shallow copy behaves as deep copy whereas in a nested list, shallow copy doesn't behave as deep copy.

  • @bhaskarg8438
    @bhaskarg8438 3 года назад

    Your are Great !! helping the community

  • @gtsui87
    @gtsui87 2 года назад

    This was a great explanation it was very clear. However, is it possible to add an example of when you would use either shallow copy or deep copy. I'm not sure when these things would get used.

    • @mohammadazad8350
      @mohammadazad8350 Год назад

      I had a nested list which I wanted to copy using "=" and it didn't work, so deep copy is useful, however I can also make a loop that does the same thing

  • @ezzsnippet125
    @ezzsnippet125 26 дней назад

    Nice explanation sir

  • @shailajadavangave45
    @shailajadavangave45 Год назад

    Thank you so much well easily explaiend

  • @osmanmerdan1169
    @osmanmerdan1169 2 года назад

    Thank s for this great explaination

  • @awkashi
    @awkashi Год назад

    so helpful and clear! thank you :)

  • @235orel
    @235orel 2 года назад

    Very helpful and clear! thanks!!

  • @helpingnextgeneration
    @helpingnextgeneration 3 года назад

    Thank you so much!
    Very well explained

  • @user-he8jx6ci8x
    @user-he8jx6ci8x 2 года назад

    Thank you so much this was a very good explanation

  • @hakimeghaffari7889
    @hakimeghaffari7889 3 года назад

    Very well explained. Thank you...

  • @anchalpatel10
    @anchalpatel10 2 года назад +1

    well explained!!

  • @ranvirpoddar6710
    @ranvirpoddar6710 2 года назад

    Thank you so much, you saved me several hours 🤗

  • @chetanmarane2514
    @chetanmarane2514 2 года назад

    What is difference between deep copy and =

  • @diegobarrientos6271
    @diegobarrientos6271 3 года назад

    thanks!, very clear explanation

  • @faizanwar_
    @faizanwar_ 2 года назад

    Very well explanated

  • @abdelrhmandameen2215
    @abdelrhmandameen2215 3 года назад

    Great explanation. Thanks.

  • @carforyou6573
    @carforyou6573 3 года назад +1

    thank you, sir

  • @samialvi4226
    @samialvi4226 2 года назад

    Great explanation
    Thanks

  • @yuvarajpanneerselvam7644
    @yuvarajpanneerselvam7644 Год назад

    i ma mechanical engineer but watching this i can clearly understand excellent way of teaching

  • @AshisRaj
    @AshisRaj 2 года назад

    Excellent explanation

  • @riz_ahmeds
    @riz_ahmeds 26 дней назад

    Really helpful,

  • @tejasj5485
    @tejasj5485 2 месяца назад

    concept ok. but whats the use of it ?

  • @kolla_teja
    @kolla_teja 3 года назад

    very great series thank you sir

  • @sojwalgosavi4406
    @sojwalgosavi4406 2 года назад +1

    print("Very well explained...")

  • @darshanapatil9218
    @darshanapatil9218 3 года назад

    excellent explanation!!!

  • @mohseneb.6263
    @mohseneb.6263 2 года назад

    So Helpful!

  • @devrajbhattacharya7912
    @devrajbhattacharya7912 Год назад

    THANKS A LOT SIR

  • @kunchalaharikrishna6316
    @kunchalaharikrishna6316 Год назад

    👏👏TYSM

  • @dineshkannan7580
    @dineshkannan7580 3 года назад

    Can I use .copy(deep=True) for deep copy

  • @-Me-yl2ou
    @-Me-yl2ou 3 года назад

    Started learning python today ✌️

  • @ravimody5536
    @ravimody5536 Год назад

    Does this even apply to dataframes?

  • @shadow_self8564
    @shadow_self8564 3 года назад

    Thanks a lot!

  • @soumyaranjansethi1790
    @soumyaranjansethi1790 3 года назад

    Amazing thank you

  • @mayursai7220
    @mayursai7220 3 года назад

    Bro please explain how to change my career path into cloud computing
    Currently i am working as uxdesigner
    Please do a video on that 🙏🙏

  • @surajprajapati3447
    @surajprajapati3447 3 года назад

    Sir can you make video on business analytics

  • @sanjayjattinagoudar2481
    @sanjayjattinagoudar2481 3 года назад

    @Krish Too may ads in the vedio is spoiling the flow

  • @nishanthgajjala5282
    @nishanthgajjala5282 3 года назад

    Hello Sir, if we want to reach out for you how do we reach

  • @NandWebDev
    @NandWebDev 3 года назад

    Sir plz do a multithread concepts in python

  • @tiberius1921
    @tiberius1921 3 года назад

    Спасибо!

  • @puspitasahoo3420
    @puspitasahoo3420 2 года назад +1

    7:23

  • @vrindavaneshwari_ju_ki_kripa
    @vrindavaneshwari_ju_ki_kripa 2 года назад

    Ty bhaiya

  • @rohitpant6473
    @rohitpant6473 2 года назад

    keep it up

  • @mohammadazad8350
    @mohammadazad8350 Год назад

    I always thought python had "deep copy" set by default since it worked with non iterables but then I encountered a strange bug which brought me here

  • @abcdeftanutanu2187
    @abcdeftanutanu2187 2 года назад

    nice

  • @akhilsartnation9262
    @akhilsartnation9262 3 года назад

    maza aagaya bhai

  • @tashinahamed7822
    @tashinahamed7822 3 года назад

    I've blundered 3 hours why list have changed automatically before watching this video

  • @manishsrivastav4897
    @manishsrivastav4897 2 года назад

    bhai jo jis doubt ko le k aaega wo waisa ka waisa he reh jaega iss video me

  • @puspitasahoo3420
    @puspitasahoo3420 2 года назад

    8:58

  • @cagataytekin6372
    @cagataytekin6372 9 месяцев назад

    buyuksun hoca

  • @nandinikose1414
    @nandinikose1414 2 года назад

    👾😁👍

  • @surendra_tarai
    @surendra_tarai Год назад

    It can be explained in better way.

  • @sudharsanb9391
    @sudharsanb9391 3 года назад +2

    First

  • @AbhishekJha-wm5oq
    @AbhishekJha-wm5oq 2 года назад

    Full confused