Robots Atlas>ROBOTS ATLAS

Python — From Basics to Advanced · Functions and Modules

Modules and Import

Functions and Modules

Introduction

A module is a .py file containing Python code. With the import keyword you can reuse code from other files and tap into Python's huge standard library. In this lesson you meet the three basic import forms, aliases, the if __name__ == "__main__" idiom and a few common standard-library modules.