I have a code in Python-Part/Modules&Packages/salute.py
def say_hello(name):
print(f'Hello {name}')
fruits = {
'name': 'Grapes',
'color': 'Green'
}
I have a code in Python-Part/Modules&Packages/my_module.py
import salute
from salute import fruits
salute.say_hello('Rafi')
print(fruits['name'])
When I put them in the Python-Part
directory they were working fine but when I move them into Python-Part/Modules&Packages
, my_module.py
is not importing salute.py
.
Now, I want to know why this is happening and how to overcome from it?