gitvip-初学Python

Posted on 2018-08-02 15:57  gitvip  阅读(114)  评论(0)    收藏  举报
Python
解释器提示符,输入:
grtyfc.lofter.com
print(
)
在输入完成后按下
[enter]
键。你将会看到屏幕上打印出
Hello World
字样。
下面是一个在
Mac OS X
电脑上你能够看见的结果的示例。有关
Python
软件的细节将会因为
你使用的电脑而有所不同,但是从提示符(如
>>>
)开始部分应该是相同的,而不会受到操
作系统的影响。
> python3
Python
3.5
.1
(default, Jan
14
2016
,
06
:
54
:
11
)
[GCC
4.2
.1
Compatible Apple LLVM
7.0
.2
(clang
-700.1
.81
)] on darwin
Type
"help"
,
"copyright"
,
"credits"
or
"license"
for
more information.
>>>
print(
"Hello World"
)
Hello World
你自然会注意到,
Python
会立即给你输出了一行结果!你刚才所输入的便是一句独立的
Python
语句
。我们使用
print
(不必太过惊讶)命令来打印你所提供的信息。在这里,我
们提供了文本
Hello World
,然后它便被迅速地打印到了屏幕上。