26
loading...
This website collects cookies to deliver better user experience
"For millions of years mankind lived just like the animals.
Then something happened which unleashed the power of our imagination,
We learned to talk."
type = 20
[A variable]def roar(name):
... return f'{name} roars'
import dinosaur
from dinosaur import roar
dinosaur.py
creates a variable name dinosaur
and also creates another variable type
which is inside the dinosaur.py
moduledinosaur.type
and dinosaur.roar
) we can get to our variable and function.roar
. So, when I call the statement :roar
to be used inside the program.from dinosaur import *
[This causes to replace all variables in your local namespace]