?/100

Python's sharpest corner is ... plus equals? (+=)

April 13, 2021238488

Description

If you thought x+=y means x=x+y you'd be wrong! Python's plus equals augmented assignment syntax is more complex than many people realize. Let's take a look. (Sorry for the dark purple again! I've changed it in my ide to pink for the future!) ā€• mCoding with James Murphy (https://mcoding.io) Source code: https://github.com/mCodingLLC/VideosSampleCode Docs for iadd: https://docs.python.org/3/reference/datamodel.html#object.__iadd__ SUPPORT ME ā­ --------------------------------------------------- Patreon: https://patreon.com/mCoding Paypal: https://www.paypal.com/donate/?hosted_button_id=VJY5SLZ8BJHEE Other donations: https://mcoding.io/donate BE ACTIVE IN MY COMMUNITY šŸ˜„ --------------------------------------------------- Discord: https://discord.gg/Ye9yJtZQuN Github: https://github.com/mCodingLLC/ Reddit: https://www.reddit.com/r/mCoding/ Facebook: https://www.facebook.com/james.mcoding

Wheatcha