Python live interpreter:
In the previous article, we have seen, how to enter in python live interpreter.
For exit from that, use 'exit()' command.
Syntax in python
It does not have typical syntaxes like Java and C, but there are
some rules of python language that you have to follow.
Indentation:
Indentation is used in
python language everywhere. Indentation is nothing but they are spaces at the beginning
of line code.
In python, Indentation or you must say proper indentation is very important because it indicates a block of code. Like in C and Java, we have to use curly braces {} to separate that block of code. But in python, we have to use indentation.
Even if you don’t give proper indentation or if you give more
and less indentation, it will give an error.
First case:
Second case:
Now, you have understood about this indentation. Let's move on the next topic.
Variables in python
Variables are the containers in which you can store data value. These are generally named for a memory place. In python, you don't need to declare the type of a variable, you can simply write the variable name and assign its value. For example,



Post a Comment