Skip to Content
Python Distilled
book

Python Distilled

by David M. Beazley
September 2021
Beginner to intermediate
352 pages
11h 27m
English
Addison-Wesley Professional
Content preview from Python Distilled

10. Built-in Functions and Standard Library

This chapter is a compact reference to Python built-in functions. These functions are always available without any import statement. The chapter concludes with a brief overview of some useful standard library modules.

10.1 Built-in Functions

abs(x)

Returns the absolute value of x.

all(s)

Returns True if all of the values in the iterable s evaluate as True. Returns True if s is empty.

any(s)

Returns True if any of the values in the iterable s evaluate as True. Returns False if s is empty.

ascii(x)

Creates a printable representation of the object x just like the repr(), but only uses ASCII characters in the result. Non-ASCII characters are turned into appropriate escape sequences. This can be used to ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python Testing with pytest

Python Testing with pytest

Brian Okken
Robust Python

Robust Python

Patrick Viafore

Publisher Resources

ISBN: 9780134173399