Python language syntax is very easy to learn.
Comparison of Python syntax with other programming languages
- To write your python code, you do not need to wrap it inside any tags. You can create a python file with .py extension and start writing your python code.
- In some other programming languages we use semicolons (;) : to represent end of command. In python a new line represents the end of command so no need for semicolon
- normal brackets, or parenthesis ( ): most of the time represent a function.
- square brackets [ ]: are for arrays
- curly braces { }: define a data structure called a dictionary
- In some other programming languages curly braces are used to define the block or body of a structure. In python we use colon and indentation to define the body of a structure.