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')


Welcome to Port au Prince, peter
Welcome to Cap Hatien, peter

In [22]:
hello("peter2")


Welcome to Port au Prince, peter2

In [23]:
hello1('peter1')
hello2('peter1')


Welcome to Port au Prince, peter1
Welcome to Cap Hatien, peter1

In [24]:
print(pi,math.pi)


(2.718281828459045, 3.141592653589793)

In [ ]: