معاملات المقارنات comparison operators in python تستخدم لإجراء المقارنات بين قيم المتغيرات, يمكن إستخدام الشرط if لإجراء المقارنة.
# == Equal # != Not Equal # > Greater than # < Less than # >= Greater than or equal to # <= Less than or equal to
تساوي أو عدم تساوي القيم
x=10 y=7 if x == y: print("are qual") elif x != y: print("not qual")
القيمة أكبر من أو أصغر من
x=10 y=7 if x > y: print("x greater than y") elif x < y: print("y greater than x")
القيمة أكبر أو تساوي – القيمة أصغر من أو تساوي
x=10 y=7 if x >= y: print("x greater than y or equal") elif x <= y: print("y greater than x equal")
- روابط هامة لكورس لغة بايثون
- المتغير variable python
- انواع البيانات data type python
- if condition in python
- for loop in python
- while loop in python
- arithmetic operators in python
- assignment operators in python
- comparison operators in python
- logical operators in python
- identity operators in python
- input command in python
- array collection in python
- list in python
- tuple in python
- set in python
- dictionary in python
- iterators in python
- function in python