Have you tried out the arithmetic operations on python yet ? If not, I strongly recommend you to visit the first part of the crash course. For the rest of you, let’s get started.
The assignment operator in python is the “equal to” ( = ) sign as shown below:
In : var = 2 In : var Out: 2
Some more examples:
In : X=4 Y=10 In : X+Y Out: 14
If your variable comprises of multiple words then separate the words with a “under score” ( _ ) symbol as shown below :
In : multiple_words_var = 10
1) Variable names shouldn’t start with numbers.
2) Variable names cannot start with special symbols as well.
3) Variable names are case sensitive.
Feels like we are using C programming, aren’t we ? It’s that simple. Let’s go to strings now.