Skip to content

Instantly share code, notes, and snippets.

@makwanadeepam
Created March 27, 2024 18:36
Show Gist options
  • Save makwanadeepam/f5ea1276aec4e257dcd6f06868bc4e23 to your computer and use it in GitHub Desktop.
Save makwanadeepam/f5ea1276aec4e257dcd6f06868bc4e23 to your computer and use it in GitHub Desktop.
# Arithmetic Operators & Assignment Operators
print(
5+3,
5-3,
5*3,
5/3,
5%3,
5**3,
5//3
)
x=5
x+=5
print(x)
x**=2
print(x)
# Comparison: ==, !=, >, >=, <, <= (Useful in conditionals & loops)
# Logical: and, or, not (Useful in conditionals & loops)
# Identity: is, is not (object level comparison)
# Membership: in, not in
# Bitwise: &, |, ^, ~, <<, >>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment