DEV Community

Im Code
Im Code

Posted on

Create a module with python

Hello
Welcome To This Post
Start to create module:
Create a module with hello name
Lets go
Enter This Code In terminal
mkdir hello
change hello to module name
and while create folder enter this code
cd hello
and open editor to start
for create hello module create file with hello.py name
how to create world for hello module

def world():
    # Your Code here
    print("Hello World")
Enter fullscreen mode Exit fullscreen mode

use hello module:
Create New File in module dir
and for print hello world run this code

import hello
hello.world()
Enter fullscreen mode Exit fullscreen mode

Thank you for read this post

Top comments (0)