file extension

The part of a file name after the last dot, such as .py or .txt, that tells programs what kind of file it is.

In more detail

The extension is a naming convention: changing it does not change what is inside the file, only which program opens it. Windows hides extensions by default, which makes it easy to save a file with a double ending such as notes.txt.txt by mistake.

Example

Python programs end in .py, so hello.py.txt will not run as a program.

Related terms

Taught in

References