Imports and Modules

  • Imports let you break your code into files that reference each other
  • Also let you import parts of a library (but not the whole thing!)
  • Using imports also opts you into using modules
  • Modules make sure that variables and functions from one file don't "leak"
  • Let you write bigger projects without worrying about "collisions"

8 / 10