Is Python's += operator the same as = and +?

Publié le: 20 février 2022
sur la chaîne: Python and Pandas with Reuven Lerner
4,395
87

When you learned Python, you probably learned that the += operator is short for = and then +. But that's not entirely true, especially when dealing with mutable data like lists. In this video, I show the differences between them, including where a recent student of mine found out (the hard way) just how they differ.

The Jupyter notebooks for these videos are all on GitHub, at https://github.com/reuven/youTube-not.... And don't forget my free, weekly newsletter about Python at https://BetterDevelopersWeekly.com/!


Sur cette page du site, vous pouvez voir la vidéo en ligne Is Python's += operator the same as = and +? durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Python and Pandas with Reuven Lerner 20 février 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 4,395 fois et il a aimé 87 téléspectateurs. Bon visionnage!