Copyright (c) Hyperion Entertainment and contributors.
AmigaOS Manual: Python Elements of Python: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
Added an IPC section |
Added table of operators. |
||
Line 18: | Line 18: | ||
== Comparison operators == |
== Comparison operators == |
||
{| class="wikitable" |
|||
! Operator !! Name !! Explanation |
|||
|- |
|||
| < || Less Than || Returns whether x is less than y. All comparison operators return 1 for true and 0 for false. This is equivalent to the special variables '''True''' and '''False''' respectively. Note the capitalization of these variables' names. |
|||
|- |
|||
| > || Greater Than || Returns whether x is greater than y. |
|||
|- |
|||
| <= || Less Than or Equal To || Returns whether x is less than or equal to y. |
|||
|- |
|||
| >= || Greater Than or Equal To || Returns whether x is greater than or equal to y. |
|||
|- |
|||
| == || Equal To || Compares if the objects are equal. |
|||
|- |
|||
| != || Not Equal To || Compares if the objects are not equal. |
|||
|} |
|||
== Boolean operators == |
== Boolean operators == |
Revision as of 01:24, 9 January 2019
Data types
Numeric types
Tuplets and lists
Strings
Dictionaries
Files
Other data types
Operators
Arithmetic operators
Comparison operators
Operator | Name | Explanation |
---|---|---|
< | Less Than | Returns whether x is less than y. All comparison operators return 1 for true and 0 for false. This is equivalent to the special variables True and False respectively. Note the capitalization of these variables' names. |
> | Greater Than | Returns whether x is greater than y. |
<= | Less Than or Equal To | Returns whether x is less than or equal to y. |
>= | Greater Than or Equal To | Returns whether x is greater than or equal to y. |
== | Equal To | Compares if the objects are equal. |
!= | Not Equal To | Compares if the objects are not equal. |