#python variables
#Variables are containers for storing data
#To create a variable you assign using (=)
#Examples
x=3
w="Alex"
print (x)
print(w)

#A variable name must start with a letter or the underscore character
#A variable name cannot start with a number
#A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )
#Variable names are case-sensitive (age, Age and AGE are three different variables)

#legal variable names
myvar = "Alex"
my_var = "Alex"
_my_var = "Alex"
myVar = "Alex"
MYVAR = "Alex"
myvar2 = "Alex"

#Illegal variable names:
#2myvar = "Alex"
#my-var = "Alex"
#my var = "Alex"


#Assigning multiple Variables
a,b,c = "Banana","Apple","Grapes"
print(a)
print(b)
print(c)

#In calculations underscore can be used to calculate values using a the last previous calculation result
x=3
y=4
z=6
x+y= 7
_ +6 =13

#To check the formula of a variable we use the len function
myname= "Alexis"
len (myname) =6

#To slice you use indexing.The first index is [0]
myname [1:4]= lex

#When you use negative index it starts from the right side ie.
len myname [-1] = s

#Stirngs are imutable ie. Once you asign a variable with a string you can not change it










