Memorize Built-in Python Modules

This is a challenge to memorize a list of standard Python modules. The link and attached files are for Python 2.7, but you could memorize Python 3 modules instead.

I created CSV and Anki files for Python 2.7 modules with deprecated modules removed. (Attached)

Required copyright notice:
The text in the two attached files comes from the Python docs and is “Copyright © 2001-2013 Python Software Foundation; All Rights Reserved”. It's being redistributed under the terms of the Python license.

Difficulty level: 
Intermediate
25 August, 2017 - 16:09
moo
moo's picture
Offline
Joined: 6 months 16 hours ago

So, I just did this for python 3.6.

Why?
I program in other languages, and wanted to pick up python. I use it at work, but nowhere near the level of my main language. I've never taken this approach (memorizing) before, usually I just dive in and google everything.

Method
I started out doing it alphabetically, but boot soon realized thematic would be more useful. So I used the "Python Language Reference" to set the order. Going by chapters/themes you end up with ~ 189 modules to memorize.

For a memory palace, I picked a huge house that I had been to a lot as a kid, but can't visit now.

I used MoL & roman room method. After each set (chapter), I mentally walked through that section. Then, I put the list in Anki and used overlapping cloze deletion. I also recorded everything in MS Excel as Station, Loci, Module Name. I memorized everything in four separate sessions between 4 hrs and 1.5 hours each.

Interesting results, I got faster over time.
Minutes per module by session #

  1. >4
  2. n/a
  3. 2.84
  4. 1.73

This time includes preparing the MP, thinking up some imagry, and one review. I'll keep reviewing with Anki.

Observations:

  • Using the computer actually takes up most of the time. Perhaps in the future I'll only make 1x simple flash card per section like: front="python string modules" / back="8x (see MP master)" Which would be a prompt to think up all 8 of the string modules.
  • It's hard to come up with linking imagery for abstract things. But I started to come up with reusable visual language. E.g. pasta making was parser, etc.
  • Overlapping cloze delition shows the preceding list item and asks for the next in the list. The works great with MoL. Practicing again the second day,... that days session seems pretty much "locked in my head"
  • Was it worth it? Because it killed two birds with one stone—helped me learn some python and was a way to practice mnemonics—it was. If I was already good at a memorizing, I'm not sure... hard to say.
25 August, 2017 - 16:42
Offline
Joined: 2 years 8 months ago

Nice, thanks for the update.

I just realized that my attached text files are missing. I'll try to find them. I think they were generated with commands like this:

Strings: print('\n'.join([x for x in dir('') if '__' not in x]))
Ints: print('\n'.join([x for x in dir(123) if '__' not in x]))
Lists: print('\n'.join([x for x in dir([]) if '__' not in x]))
Dicts: print('\n'.join([x for x in dir({}) if '__' not in x]))
Sets: print('\n'.join([x for x in dir({1,1}) if '__' not in x]))
Etc.

Snippet like that can be used to get a list of methods for any library:

import os; print('\n'.join([x for x in dir(os) if '__' not in x]))
import pandas; print('\n'.join([x for x in dir(pandas) if '__' not in x]))

Sample output:

list of Python 3 methods

Download our free ebook! Just click the "Sign up" button below to create an account, and we'll send you a free ebook with tips on how to get started.

Related content: