Back
Close

Rust for Python Developers - Operators

Shin_O
4,704 views

This article was originally published on Medium

Follow me:

Compound Assignment Operators

All the Rust and Python compound assignment operators have the same symbols except Rust doesn’t have the equivalence of power assignment **=, and floor division assignment //=.

MeaningPythonRust
Arithmetic addition and assignment+=+=
Arithmetic subtraction and assignment-=-=
Arithmetic multiplication and assignment*=*=
Arithmetic division and assignment/=/=
Arithmetic remainder and assignment%=%=
Bitwise AND and assignment&=&=
Bitwise OR and assignment|=|=
Bitwise exclusive OR and assignment^=^=
Left-shift and assignmen<<=<<=
Right-shift and assignment>>=>>=
Arithmetic power assignment**=None
Arithmetic floor division assignment//=None
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants