In [15]:
# this is the safe way, with module name space' to import
import pap
import ch
In [16]:
# if you redefine hello, you will loose the first one
from pap import hello as hello1
from ch import hello as hello2
In [20]:
# here both will define hello, so the last one wins
# very dangerous to use 'import *' as you do not remember
# where the function came from
from pap import *
from ch import *
In [21]:
pap.hello('peter')
ch.hello('peter')
In [22]:
hello("peter2")
In [23]:
hello1('peter1')
hello2('peter1')
In [24]:
print(pi,math.pi)
In [ ]: