Variables & Data
So, you've mastered the Hello World! program and you want to move forward? Excellent. Let's talk about storing and manipulating Data.
// can hold all sorts of data and is globally scoped (more on scope later)
var myVariable;
// can hold all sorts of data and is locally or block scoped
let myOtherVariable;
// can hold all sorts of data but that data cannot change (or shouldn't, at least)
const myConstant;a = 123 # integer
b = 123L # long integer
pi = 3.14 # double float
myString = "hello" # string
myList = [0,1,2] # list
myTuple = (0,1,2) # tuple
myFile = open(‘hello.py’, ‘r’) # fileLast updated