I'm trying to write a program that is related to another program, so how can I access the individual functions from my previous program and work with them as required, I know you are suppose to import that program but what to do after that.
The program that I import how can I use functions from it.
It would be better if you write code. I assume your 1st code is code1.py and you want to use fun1 from it in code2.py. Put them in same directory . . .
import code1 code1.fun1()
from code1 import * fun1()
Note: 2nd method is not recommended.