how to make a python module or fuction and use it while writing other programs?
<p>There where many instances where i have to write large line of code over and over again in multiple programs. so i was wondering if i could write just one program, save it and then  call it in different programs like a function or a module.</p>

<p>An elementary example :- I write a program to check if a number is palindromic or not. Then i want to write a program to check if a number is a palindromic a prime, could i just call the first program and do the rest of the code to check if it is prime or not.</p>

<p>P.S I'm just a beginner at python or computer science for that matter and i use IDLE to do all my python programs.</p>

<p>You should check out the python documentation.  If you still have questions then come back.</p>

<p><a href="https://docs.python.org/2/tutorial/modules.html" rel="nofollow">https://docs.python.org/2/tutorial/modules.html</a></p>

python function module