本文实例讲述了Python编程入门之Hello World的三种实现方式。分享给大家供大家参考,具体如下:
第一种方式:
$python
>>>print('hello world')
Copy after login
屏幕上输出hello world
print是一个常用函数
第二种方式:
复制代码 代码如下:
$python hello.py
第三种方式:
#!/usr/bin/env python
chmod 755 hello.py
./hello.py
Copy after login
希望本文所述对大家Python程序设计有所帮助。
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
-
2025-02-24 12:36:12
-
2025-02-24 12:11:09
-
2025-02-24 12:06:10
-
2025-02-24 12:04:13
-
2025-02-24 12:03:10
-
2025-02-24 12:02:09
-
2025-02-24 12:01:10
-
2025-02-24 12:00:16
-
2025-02-24 11:59:10
-
2025-02-24 11:58:14