I have a file with a function. I want to import the file and when doing that I get No module named ex25.
import ex25
I have checked some tutorials and the offial documentation.



import ex25
      No module named ex25
First, check if the file is .py file and in the same folder with the file that you are currently working on, there shouldn't be any problem at all. 
If not in the same folder, but in a different folder and make sure that your file is .py file, you need to make that folder (which contains the file) to a package by adding a file name __init__.py
How do I import a file to execute a function