Home >Backend Development >Python Tutorial >what are python code blocks

what are python code blocks

藏色散人
藏色散人Original
2019-06-21 14:06:4212964browse

what are python code blocks

What are python code blocks?

Python programs are constructed from code blocks. A block is the text of a Python program that is executed as a unit.

Code block: A module, a function, a class, a file, etc. are all a code block.

Each command entered interactively is a code block.

What is interactive mode? That is, when we enter the Python interpreter in cmd, each line of code is a code block, for example:

what are python code blocks

And for two functions in a file, they are also Two different code blocks:

what are python code blocks

Related recommendations: "Python Tutorial"

The above is the detailed content of what are python code blocks. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn