Python Tutorial Part 2 - Python Syntax

preview_player
Показать описание
What is Python Syntax?
Python syntax is a set of rules that defines how a Python program is written and interpreted.
Python syntax allows readability and simplicity, which makes it an excellent choice for beginner.

Python Syntax Usages
1. Code Block Indentation Python uses whitespace as indentation to define code blocks.
2. Comments are used to document your code. # """
3. Variables are user defined names and they are dynamically typed.
4. Data Types like numbers, string, list, tuples, dictionaries and sets have their own set of rules.
5. Control flow statements like if, else, for loop, etc start with their name end with colon :
6. Functions is defined using the def keyword, ending with colon :

Python Syntax [ Demo ]

Conclusion
Python’s syntax is designed to be simple, readable, and efficient.
Python’s syntax makes coding easy, give it a try if you have not started.
Рекомендации по теме
welcome to shbcf.ru