Symbols and Operators

작성자

카테고리:

← 피드로
DEV Community · Punitha · 2026-06-30 개발(SW)

Punitha

What are Symbols and Operators?

  • Symbols are special characters used in Python to represent operations or actions.

  • Operators are symbols that perform specific operations on variables and values.

Example:

a = 10          ->  a and b are operands
b = 5           ->  = is an assignment operator

c = a + b       ->  + is an arithmetic operator

Enter fullscreen mode Exit fullscreen mode

Symbol and Operator Name

Arithmetic Operators 
  +                                     Addition
  -                                     Subtraction
  *                                     Multiplication
  /                                     Division/True division
  //                                    Floor division
  %                                     Modulus
  **                                    Power/Exponent

Enter fullscreen mode Exit fullscreen mode

Comparison Operators
  ==                                    Equal to
  !=                                    Not Equal
  >                                     Greater than
  >=                                    Greater than or equal to
  <                                     Less than
  <=                                    Less than or equal to

Enter fullscreen mode Exit fullscreen mode

Logical Operators
  and                                   Logical AND
  or                                    Logical OR
  Not                                   Logical NOT

Enter fullscreen mode Exit fullscreen mode

Identity Operators:

Used to check whether two variables refer to the same object.

Identity Operators
  is                                    Identity      
  is not                                Not Identity

Enter fullscreen mode Exit fullscreen mode

Membership Operators:

Used to check whether a value exists in a sequence.

Membership Operators
  in                                    Membership
  not in                                Not Membership

Enter fullscreen mode Exit fullscreen mode

원문에서 계속 ↗

추출 본문 · 출처: dev.to · https://dev.to/punitha2206/symbols-and-operators-4l02

코멘트

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다