Python syntax
Statement:- Set of instruction which a python engine can excuted is called python engine.
In python engine, There are 6 rules.
→Single statement in single line.
→Multiple statement in single line.
→Single statement in multiple line.
→Comments.
→Keywords.
→Variables
1.Single statement in single line:- We can write single statement in single line. If incase, not follow the rule we will get syntax error.
For example:
2.Multiple statement in single line:- We can write multiple statement in single line. In this rule we need to use semicolon ‘ ; ‘ . Symbol in between two statement
For example:
→Single statement in multiple lines:- We can write single statement in multiple lines. In this rule we need to use backward( \ )and parentheses ( ).
*It is used where ever you want to break or split the statement their we are going to use it.
For example:-
4.Comments:- There are also set of instructions. This set of instructions can’t be executed by python engine. Ignored by python engine is called comments.
Get Vamsikrishna Kkd’s stories in your inbox
Join Medium for free to get updates from this writer.
→In this comments, We using symbol is called (#)Hashtag. To convert of instruction into comment.
There are two types of comments.
- Single line comments.
- Multiple line comments.
**Single line comments:- In single line comment , We use one time hashtag in single line comment.
**Multiple line comment:- In multiple line comment, We use multiple hashtag in multiple line comment.
5.key words:- It is also called as Reversed words. In python engine already exists some keywords . In Keywords are reversed words which has a special meaning in python engine
In python engine we have nearly 35 key words.
In keywords,
- True
- False
- None
This 3 keywords are always write first letter in uppercase.
Rest of 32 keywords are in lowercase.
If you want to see all keywords.
6.Variable:- A variable used to store data or information in memory.
→variable as a container that holds a value.



