Python Variables and Data Types

Rafay Syed
9 min readSep 5, 2019

What is a variable in Python? You can think of a variable as a container that stores some value. That value could be a number or a string, which is a sequence of characters. You can think of a variable as the mailbox and the value as the letter, as shown in the illustration below.

Photo by Arcbotics

The mailbox stores the letter, just as a variable stores the value. When you have a variable assigned to a value, that is known…

--

--

Rafay Syed

Software Engineer at Salesforce and Lifelong Student