Assignment Operators in Python - #14

Share

Summary

An introduction to using assignment operators in Python, focusing on how to combine arithmetic operations with assignment to write more elegant code.

Highlights

Introduction to Assignment00:00:00

Explanation of the basic equal sign (=) as an assignment operator, which is used to store values within variables.

Using Combined Math Assignment Operators00:01:33

Introduction to shorthand assignment operators like +=, -=, *=, /=, **=, and %=, which perform a math operation and then reassign the result to the variable.

The Importance of Reassignment00:04:09

A demonstration showing that simply using a math operator on a variable in a print statement does not update the variable's value; one must use an assignment operator to save the updated value for future use in the program.

Review of Operators and Modulus00:05:43

A summary of how various math operators work with assignment, including a brief refresher on how the modulus operator returns the remainder of a division.

Recently Summarized Articles

Loading...
Summarize another YouTube video →