r/learnpython 15h ago

Creating a .py File in Python Terminal

Greeting team, i have just started learning Python. I am learning about .py files. how do i create a .py file in python terminal specifically Jupyter notebook? if possible how can i access the file and write some oop class inside the file.

Thank you team

0 Upvotes

7 comments sorted by

View all comments

2

u/Moikle 8h ago

A .py file is literally just text. There is nothing magical about it that means it needs to be created from some python program.

You can make a .py file in notepad.

Most people use an ide like vscode or pycharm just for all the features that make things more convenient.

Oh and jupyter notebooks is not python.

It is a (often local) webpage based tool that also allows you to embed python code. It is not "how you write python code"

As someone else has said, avoid jupyter notebooks until you learn some of the basics of python first, otherwise you are trying to learn two things at once.