Comparision Operators

 

  • < : Less than
  • <= :less than or equal to
  •  

  • > : Greater than
  • <= :Greater than or equal to
  •  

  • == : Eaual
  • != :Not Equal
  •  

  • is : object identity
  • is not :negated object identity
  •  

    Arithmatic Operators

     

  • + : Addition
  • 2+3

  • - : Subtraction
  • 5-3

  • * : Multiplication
  • 2*3

  • / : Division
  • 4/2

  • ** : Exponent
  • 3**3 = 27

  • % : Modulus
  • returns the remainder of division: 14 % 3 = 2

  • // : Floor Division
  • returns the quotent 14//3 = 4

     

    Assignment Operators

     

  • = : equals right hand value to left
  • a = 5, a = b

     

  • += : equals right hand value to left
  •  

  • -= : Subtract and
  •  

  • *= : multiply and
  •  

  • /= divides and
  •  

  • **= exponent
  •  

  • //= floor division and
  •  

    Logical Operator

     

  • and
  • or
  • not
  •  

     

    In and Not In Operator

     

     

     

    Escape Character