create folder to put your pyhton files e.g. dedetoklib,
the structure of directory
~/
│
├── dedetoklib/
│ ├── __init__.py
│ └── hello.py
│
└── main.py
hello.py
def say_hello():
return "Hello, World"
__init__.py
(leave it empty)
main.py
import dedetoklib.hello
dedetoklib.hello.say_hello()
import as library
import dedetoklib.hello as h
print(h.say_hello())