1.7. Python基础回顾¶
1.7. Review of Basic Python
在本节中,我们将回顾编程语言 Python,并提供一些更详细的示例来体现上一节中的想法。 如果您是 Python 新手或发现需要有关所提供的任何主题的更多信息,我们建议您查阅资源,例如 “Python 语言参考”、“Python 教程” 或 https://docs.python.org/ 中提供的其他文档。 我们的目标是让您重新熟悉该语言,并强化一些将成为后续章节核心的概念。
Python 是一种现代、易于学习、面向对象的编程语言。 它具有一组强大的内置数据类型和易于使用的控制结构。 由于 Python 是一种解释性语言,因此通过简单地查看和描述交互式会话来最容易对其进行审查。 您应该记得,解释器显示熟悉的>>>
提示符,然后评估您提供的 Python 构造。 例如,
>>> print("Algorithms and Data Structures")
Algorithms and Data Structures
显示提示、print
函数、结果和下一个提示。
In this section, we will review the programming language Python and also provide some more detailed examples of the ideas from the previous section. If you are new to Python or find that you need more information about any of the topics presented, we recommend that you consult a resource such as “The Python Language Reference”, “The Python Tutorial”, or other documents available at https://docs.python.org/. Our goal here is to reacquaint you with the language and also reinforce some of the concepts that will be central to later chapters.
Python is a modern, easy-to-learn, object-oriented programming language. It has a powerful set of built-in data types and easy-to-use control constructs. Since Python is an interpreted language, it is most easily reviewed by simply looking at and describing interactive sessions. You should recall that the interpreter displays the familiar >>>
prompt and then evaluates the Python construct that you provide. For example,
>>> print("Algorithms and Data Structures")
Algorithms and Data Structures
shows the prompt, the print
function, the result, and the next prompt.
创建日期: 2024年9月9日