import
less than a minute
Importing is the process of adding functions from additional libraries to support your program.
Imagine we wish to use the randint()
function
to choose a random number between 1 and 6, as
though we were throwing a single six-sided die.
The randint()
function is included in the
random
library, but there are three ways we
can import it, and each has its attractions.
import
|
|
import as
|
|
import from
|
|