Toggle search
Search
Toggle menu
notifications
Toggle personal menu
Editing
Installing Python
(section)
From OpenCourse
Views
Read
Edit
Edit source
View history
associated-pages
Page
Discussion
More actions
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Creating a Python file === Now we need to create a Python file. There are a few ways to do this, such as: * Using a text editor * Using the command line ==== Text editor ==== To create a new Python file, open a text editor, such as VS Code, and save the file. Save the file with the ''''.py'''<nowiki/>' extension. For example, the file could be called ''''hello.py'''<nowiki/>'. Save this file in your ''''learnpython'''<nowiki/>' directory. ==== Command line ==== You can also use the command line to create a Python file. If you are not still in your project folder, navigate to it using the ''''cd'''<nowiki/>' command. Then type the following: . > hello.py Replacing ''hello'' with the name of your file you want to create.
Summary:
Please note that all contributions to OpenCourse are considered to be released under the Public Domain (see
OpenCourse:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)