栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

python的hello world

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

python的hello world

        python输出hello world。

一、查看系统环境是否支持python,一般云主机会默认运行python2.7.5版本

ps -ef|grep python

     如果没有安装则进行安装:

yum install python

二、进入命令模式,输出hello world

    查看版本

python -V

    进入python

python

    输出hello world

print 'hello world'

三、脚本方式运行

vim test.py
chmod +x test.py

    输出hello world

#!/usr/bin/python
# -*- coding=utf-8 -*-
print 'hello wordl'
print '我的第一个python程序'

python3的print输出方式:

print('Hello World!')

demo:hello world.py

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/2622.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号