摘要: Classes provide a means of bundling data and functionality together. Creating a new class creates a new type of object, allowing new instances of that 阅读全文
posted @ 2024-06-29 22:59 开源AI精益 阅读(51) 评论(0) 推荐(0)
摘要: Until now error messages haven’t been more than mentioned, but if you have tried out the examples you have probably seen some. There are (at least) tw 阅读全文
posted @ 2024-06-29 22:58 开源AI精益 阅读(108) 评论(0) 推荐(0)
摘要: There are several ways to present the output of a program; data can be printed in a human-readable form, or written to a file for future use. This cha 阅读全文
posted @ 2024-06-29 22:57 开源AI精益 阅读(48) 评论(0) 推荐(0)
摘要: If you quit from the Python interpreter and enter it again, the definitions you have made (functions and variables) are lost. Therefore, if you want t 阅读全文
posted @ 2024-06-29 22:56 开源AI精益 阅读(69) 评论(0) 推荐(0)
摘要: This chapter describes some things you’ve learned about already in more detail, and adds some new things as well. 5.1. More on Lists The list data typ 阅读全文
posted @ 2024-06-29 22:55 开源AI精益 阅读(25) 评论(0) 推荐(0)
摘要: As well as the while statement just introduced, Python uses a few more that we will encounter in this chapter. 4.1. if Statements Perhaps the most wel 阅读全文
posted @ 2024-06-29 22:54 开源AI精益 阅读(21) 评论(0) 推荐(0)
摘要: In the following examples, input and output are distinguished by the presence or absence of prompts (>>> and …): to repeat the example, you must type 阅读全文
posted @ 2024-06-29 22:53 开源AI精益 阅读(68) 评论(0) 推荐(0)