编程语言
首页 > 编程语言> > Core Python | 2 - Core Python: Getting Started | 2.2 - Installing and Starting Python | 2.2.7 - Summ

Core Python | 2 - Core Python: Getting Started | 2.2 - Installing and Starting Python | 2.2.7 - Summ

作者:互联网

Congratulations! You've taken your first steps in Python, and you're well on your way to reading and writing much more sophisticated Python programs. In this module, we saw how to download and install Python on Windows, Linux and macOS. We covered starting your Python REPL. We evaluated some simple expressions in the REPL. We learned that in the REPL, the underscore symbol is bound to the result of the last evaluated expression. We saw how to make basic use of the print function, and we learned that the printed output is a side effect of the function, not a return value. We saw how to exit the REPL using Ctrl+Z on Windows and Ctrl+D on Linux and macOS. We were introduced to Python's use of significant whitespace. We learned that code blocks in python are initiated with a colon and comprise consecutive lines at the same indentation level. We looked at some of the advantages of significant whitespace, including clarity and consistency. We covered the basic rules for indentation in Python. On a less technical level, we covered some parts of Python's culture. We looked at the Zen of Python and saw that it could be printed by executing import this in the REPL, and we looked specifically at the idea that readability counts when writing Python code. We covered the basics of importing modules from the standard library, and we saw three forms of the import statement, importing an entire module, importing selected elements of a module, and renaming imported elements. We saw how to use Python's help system. Along the way, we saw how to use the factorial function from Python's standard math library. In the next module of Core Python: Getting Started, we'll look at Python's fundamental scalar types, integers, floats, nones, and bools, as well as some basic flow control constructs.

标签:Core,Python,some,how,REPL,covered,2.2,saw
来源: https://www.cnblogs.com/hmlhml/p/14337824.html