Python- eggs Share

We learn to program, no matter which programming language to learn, basically the first lesson to learn how to output "Hello world"
for the python, the output "Hello world" is very simple
to sublime, for example
Here Insert Picture Description
Here Insert Picture Description
in fact, there is a hidden built-in python module can quickly output "Hello world"

Start Menu -Win + R-cmd- enter the command execution window
Here Insert Picture Description
type python
Here Insert Picture Description
input import -hello- (two underscores)

Here Insert Picture Description
You can direct output "Hello world" the

2 eggs:

Here Insert Picture Description
The output of this legendary import python Zen

Roughly translated as follows:

Better than pretty ugly
obviously better than hidden.
Simple is better than complex.
Complex and difficult than good.
The flat is better than nested.
Sparse is better than tight.
Readability should be valued.
Although practicality will defeat purity, exceptions can not be above the rules.
Do not ignore any error, unless you are sure you want to do this
face is not clearly defined, refuse the temptation to guess.
To find a best only a way to solve the problem.
Although at first this method is not obvious, because you are not the parent of Python.
Do not do too well, but did not think to do might as well do
if the implementation is difficult to explain, that it is a bad idea.
If the implementation is easy to explain, that it might be a good idea.
Namespace is a wonderful idea, always close by

3 eggs:

Here Insert Picture Description
Antigravity input Import
Antigravity (weightless, anti-gravity)
will automatically through the browser, the page output https://xkcd.com/353/
Here Insert Picture Description
gravitational comic counter-earth person we can go and see the input and output!

Published 16 original articles · won praise 0 · Views 270

Guess you like

Origin blog.csdn.net/JOKERSNEAKER/article/details/105400685