python run function from a variable files in directory code example

Example 1: how to import functions from another python file

from file_name import function_name #do not include brackets or file types

Example 2: defining function in other file

//Your .h file..
#ifndef MY_HEADER
#define MY_HEADER
 int add(int, int);
#endif 

//main.cpp
#include "myHeader.h"

int main()
{
  int result = add(1,2);
  return 0;
}

//file that contain definition of the functions...
//.cpp
#include "myHeader.h"

int add(int a, int b)
{
 return a+b;
}