in ,

🧑🏻‍💻 TechAcademy | Active engineers explain how to import your own functions in Python [for beginners]

An active engineer explains how to import a self-made function in Python [for beginners]

I will explain how to import your own functions in Python.

If you're not familiar with Python in the first place, read an article that explains what Python is and get a better understanding.

 

This article is based on the contents of the TechAcademy online boot camp Python course.

 

 

What is a self-made function?

In Python, you can use the def statement to create your own functions.Use your own functions to implement functions that are not in the standard module, or to organize processes that are repeated many times.

 

How to import your own function

You can combine your own functions into modules.From other modules, you can call your own function by setting <module name >>. <Function name>.

 

[PR] We are showing a video of a learning method that does not frustrate with Python

Let's actually write

Sample code (mymod.py)

def my_add (x, ...

→See more in Tech Tech Magazine