Finding the Python reference docs

Since I'm a total Python beginner, I frequently need to read about its common built-in functions and idioms.


import requests
r = requests.get('')
  • pretty print json: json module.
import json
print(json.dumps({'4': 5, '6': 7}, sort_keys=True, indent=4))
  • Common operations on lists: sum(list), (after import math).
  • Joining the reverse of a list into a string: ''.join(reversed(list))

Finding them the hard way

For example, I stumbled upon this snippet somewhere: max([max(sequence) for sequence in train_data]). What does max do for a list? Not sure. So I googled "python max", expecting the first result would be the documentation. Nope, it's full of third-party sites and blogs.

So I went to, and typed "max" in the search box.'s search matched with some random page's css

So instead of search, I looked for reference docs. But the link to the Beginner's Guide seemed broken.

Couldn't open Beginner's Guide page
Beginner's Guide was inaccessible for a while

The documentation on the language also has no mention of max:

It turned out, I should have looked for the docs on Python built-in library.