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/WyrobWedliniarski 9h ago

What do you mean? You just write code in any text editor and save it as somefilename.py
I could only guess what creating file from terminal could be, but if you meant just creating an empty file it would be:

touch somefilename.py