Copyright (c) Hyperion Entertainment and contributors.
AmigaOS Manual: Python Functions: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
| Line 8: | Line 8: | ||
Return the absolute value of a number. The argument may be an integer or a floating point number. If the argument is a complex number, its magnitude is returned. |
Return the absolute value of a number. The argument may be an integer or a floating point number. If the argument is a complex number, its magnitude is returned. |
||
== all == |
== all() == |
||
<nowiki>all(iterable)</nowiki> |
|||
Return True if all elements of the iterable are true (or if the iterable is empty). Equivalent to: |
|||
<syntaxhighlight lang="python"> |
|||
def all(iterable): |
|||
for element in iterable: |
|||
if not element: |
|||
return False |
|||
return True |
|||
</syntaxhighlight> |
|||
== any == |
== any == |
||
== ascii == |
== ascii == |
||
Revision as of 12:52, 15 July 2018
Built-in Functions Reference
__import__
abs()
abs(number)
Return the absolute value of a number. The argument may be an integer or a floating point number. If the argument is a complex number, its magnitude is returned.
all()
all(iterable)
Return True if all elements of the iterable are true (or if the iterable is empty). Equivalent to:
def all(iterable):
for element in iterable:
if not element:
return False
return True