Learn practical skills, build real-world projects, and advance your career

A Quick Tour of Variables and Data Types in Python

Part 2 of "A Gentle Introduction to Programming with Python"
This tutorial is the second in a series on introduction to programming using the Python language. These tutorials take a practical coding-based approach, and the best way to learn the material is to execute the code and experiment with the examples. C

Storing information using variables

Computers are useful for two purposes: storing information and performing operations on stored information. While working with a programming language such as Python, informations is stored in variables. You can think of variables are containers for storing data. The data stored within a variable is called it's value. It's really easy to create variables in Python, as we've already seen in the previous tutorial.

counter = 10
counter+=4 # the same as adding 4 to counter on the rights side
counter
14