Question:

Which file extension is typically used for Python script files?

Show Hint

Always save Python programs with the .py extension so they can be run using the Python interpreter.
Updated On: Jan 20, 2026
  • .py
  • .pt
  • .java
  • .exe
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Step 1: Understand Python files.
Python programs are saved as script files so that they can be executed by the Python interpreter.
Step 2: Analyze the options.
(A) .py is the standard extension for Python scripts.
(B) .pt is not a standard Python extension.
(C) .java is used for Java programs.
(D) .exe is an executable file, not a script file.
Step 3: Conclusion.
Therefore, Python script files use the extension .py.
Was this answer helpful?
0
0