2VARIABLES AND SIMPLE DATA TYPES

image

In this chapter you’ll learn about the different kinds of data you can work with in your Python programs. You’ll also learn how to store your data in variables and how to use those variables in your programs.

What Really Happens When You Run hello_world.py

Let’s take a closer look at what Python does when you run hello_world.py. As it turns out, Python does a fair amount of work, even when it runs a simple program:

hello_world.py

print("Hello Python world!")

When you run this code, you should see this output:

Hello Python world!

When you run the file hello_world.py, the ending .py indicates that the file is a Python ...

Get Python Crash Course now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.