Though somewhat lengthy, the official Python
documentation on modules
is quite readable.