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

Published: 20 February 2022
on channel: 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/!


On this page of the site you can watch the video online Is Python's += operator the same as = and +? with a duration of hours minute second in good quality, which was uploaded by the user Python and Pandas with Reuven Lerner 20 February 2022, share the link with friends and acquaintances, this video has already been watched 4,395 times on youtube and it was liked by 87 viewers. Enjoy your viewing!