As I said in Basic Terms, you can use almost everything as your variable name, but you neet to follow those rules:
For example, those variable names are acceptable:
And those are not acceptable:
Because variable names are case sensitive, so
Example are two different names.
Assign a variable means you are giving a value to a variable.
Here are some examples: (sentence after
# is comment)
Also, you can assign a variable by another variable:
Tip: Don’t understand
a = 10 as “variable a equals to 10”, but “give value 10 to variable a”. You will know why in the “Operators” handout.
Now we already assigned a value to a variable, but how can we actually confirm it? Use
print() function. Since we are not starting teaching function yet, the only thing you need to know is put your variable name in the brackets, this function will show what’s in the variable in the shell.
After running this,
12345 should shown in the shell.