Operators in Python

0
43

Python Arithmetic Operators

Operator Name Example
+ Addition x + y
- Subtraction x - y
* Multiplication x * y
/ Division x / y
% Modulus x % y
** Exponentiation x ** y
// Floor division x // y

Python Assignment Operators

Operator Example Same As
= x = 5 x = 5
+= x += 5 x = x + 5
-= x -= 5 x = x - 5
*= x *= 5 x = x * 5
/= x /= 5 x = x / 5
%= x %= 5 x = x % 5
//= x //= 5 x = x // 5
**= x **= 5 x = x ** 5
&= x &= 5 x = x & 5
|= x |= 5 x = x | 5
^= x ^= 5 x = x ^ 5
>>= x >>= 5 x = x >> 5
<<= x <<= 5 x = x << 5

Python Comparison Operators

Operator Name Example
== Equal x == y
!= Not equal x != y
> Greater than x > y
< Less than x < y
>= Greater than or equal to x >= y
<= Less than or equal to x <= y

 

Rechercher
Catégories
Lire la suite
Autre
高温用ポッティングコンパウンド調査レポート:市場規模、産業分析、最新動向、予測2025-2031
QYResearch株式会社(所在地:東京都中央区)は、最新の調査資料「高温用ポッティングコンパウンド―グローバル市場シェアとランキング、全体の売上と需要予測、2025~2031」を2025年7...
Par Liu Yuan 2025-07-24 07:14:17 0
Autre
Reverse Osmosis RO Membrane Market Business Domain Review: Market Range, Value Trends, Growth Forecast, and Strategic Overview
Executive Summary Reverse Osmosis RO Membrane Market : Global reverse osmosis RO...
Par Ganesh Patil 2025-06-19 07:47:54 0
Autre
世界のハイブリッドファイバーファブリック市場規模2025-2031:競合状況、需要分析、成長予測
QYResearch株式会社(所在地:東京都中央区)は、最新の調査資料「ハイブリッドファイバーファブリック―グローバル市場シェアとランキング、全体の売上と需要予測、2025~2031」を2025...
Par Zhang Weixuan 2025-07-18 05:29:46 0
Autre
グローバル二重壁パネル市場の産業全体規模とシェア分析2025-2031
2025年7月9日に、QYResearch株式会社(所在地:東京都中央区)は、「二重壁パネル―グローバル市場シェアとランキング、全体の売上と需要予測、2025~2031」の調査資料を発行しました...
Par Zhang Weixuan 2025-07-09 06:21:17 0
Autre
Quantum Dot Solar Cell Market Insights and Growth Trends
"Executive Summary Quantum Dot Solar Cell Market : CAGR Value Data Bridge Market...
Par Harshasharma Dbmr 2025-07-23 06:38:17 0
Omaada - A global social and professionals networking platform https://www.omaada.com