Knaph

Modules and imports

Splitting a program into files that others can import, so a function is written once and used everywhere - plus the standard library that comes with Python and the packages others share.

Depth 1 · Foundation

You can put functions in a module and import them three ways, guard test code with if __name__ == "__main__", use math, random (with a seed), datetime and collections.Counter, and know what pip and PyPI are for.

Sign in to prove what you know with a short quiz, see how deep you've gone, and earn XP for it.

Sign in with Google