This instruction creates a variable named name and stores text in it:
name = "Maya"Line-by-line explanation
nameis the label we chose.=means “store the value on the right under the name on the left”."Maya"is the value being stored.
Use the name without quote marks to read the stored value:
print(name)Line-by-line explanation
printdisplays a value.namehas no quotes, so Python looks inside the variable.- The output is
Maya.
Assigning a new value is like replacing what is inside the same labeled box:
name = "Noah"Line-by-line explanation
nameis the same label.=performs another assignment."Noah"replaces the earlier value.