tubeshowcase●1,121,289 videos♡ My collection 0
← Learn to Code

Learn to Code07:23

Multiple Assignments in Python

mCoding ↗

From the creator

Chain those equals signs! Python allows multiple assignments, or chained assignments, to assign multiple variables or expressions at once. This can be a useful tool but it is also a source of confusion when the multiple assignments involve the same name multiple times or when the assignment target is mutable. The assignments are evaluated right hand side first, then left to right, assigning each expression to the target in turn. This differs from many other programming languages and it is also different from the way Pythons assignment expressions (the walrus operator (:=) colon equals) works. ― mCoding with James Murphy (https://mcoding.io) Source code: https://github.com/mCodingLLC/VideosSampleCode Assignment statement docs: https://docs.python.org/3/reference/simple_stmts.html#assignment-statements Evaluation order docs: https://docs.python.org/3/reference/expressions.html#evaluation-order Assignment expressions PEP: https://www.python.org/dev/peps/pep-0572/ SUPPORT ME ⭐ --------------------------------------------------- Patreon: https://patreon.com/mCoding Paypal: https://www.paypal.com/donate/?hosted_button_id=VJY5SLZ8BJHEE Other donations: https://mcoding.io/donate Top patrons and donors: Laura M, Jameson, John Martin, Vahnekie, Pieter G, Sigmanificient BE ACTIVE IN MY COMMUNITY 😄 --------------------------------------------------- Discord: https://discord.gg/Ye9yJtZQuN Github: https://github.com/mCodingLLC/ Reddit: https://www.reddit.com/r/mCoding/ Facebook: http

Published 2021-08-28 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code