Variables - an introduction

To store and load data in Python, as a developer, I need to use variables


A text can be stored in a variable.


myFirstVariable = "hello"

will store the text "hello" inside variable myFirstVariable


will print the content of myFirstVariable to the terminal (which in this case is "hello")

A variable can be named almost anything, as long as it is a single word.

We therefore use cammelCase (where all the letters are small, except when we start a new word)

so, my first variable should be written as: myFirstVariable


Make your Python script:


Python code

Terminal output

Written by: Bartek / Bartlomiej Rohard Warszawski