Your First Program
5 min · Python
Write and run your very first lines of Python — right here on the page.
Every program does something. The simplest thing a program can do is show you a message.
In Python, you show a message with print. You put the text you want to show inside the parentheses and inside quotes. Press Run below to see what happens.
Try it yourself
Loading editor...
Ln 1, Col 1Spaces: 4
Sign up to run itExpected output: Hello, World!
Print your own message
The text between the quotes is yours to change. Edit the line below to say anything you want, then Run it again. The computer prints back exactly what you put between the quotes.
Try it yourself
Loading editor...
Ln 1, Col 1Spaces: 4
Sign up to run itExpected output: Python is fun!
Your turn
Make the program print exactly: I am learning to code